首页>代码>大一软件Java Swing比赛作品《生活小助手1.2》,MVC思想开发,推荐JDK8,JDK6及以上都能运行>/LifeHelper/src/com/helper/doAction/NovelAction.java
package com.helper.doAction; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.SwingUtilities; import com.helper.Swap.Swap; import com.helper.frame.tools.FormatString; import com.helper.voice.VoiceMassegeTips; /** * 小说面板开始按钮事件响应 * @author yangtao 130016126 * */ public class NovelAction implements ActionListener { public void actionPerformed(ActionEvent e) { String actionCommand = e.getActionCommand(); if (actionCommand.equals("开始")) { // 用EDT安全线程来完成小说阅读 SwingUtilities.invokeLater(new Runnable() { public void run() { if (Swap.novelParagraphTemp >= Swap.novelLineTotel) { Swap.textArea.setText("当前小说阅读完毕!"); Swap.list = null; Swap.novelLineTotel = 0; Swap.historyNovel.remove(Swap.novelName); Swap.synthesizer=null;//结束掉语音合成器 return;// 强制结束事件 } String text = Swap.list.get(Swap.novelParagraphTemp); new FormatString().setStyle(text); try { new VoiceMassegeTips(text); } catch (NullPointerException e2) { } Swap.novelParagraphTemp++; Swap.ksButton.setVisible(false); } }); } } }

xp95323 LV15
2023年11月27日
微信网友_5852742079762432 LV6
2022年3月2日
wanglinddad LV55
2022年2月11日
baoxing567 LV9
2021年3月30日
dengdai2018 LV6
2021年2月28日
675104182 LV14
2020年9月22日
yuqm LV17
2020年8月3日
tinbe LV11
2018年12月19日
jasyr1314 LV11
2018年10月20日
Weipeng_ LV14
2018年6月22日

pengkui LV14
2024年11月29日
微笑刺客 LV21
2024年11月22日
杨秀益 LV1
2024年6月17日
Dominick LV14
2024年3月5日
xp95323 LV15
2023年11月27日
xingxing1234 LV10
2023年3月22日
Hsy605 LV9
2022年6月20日
1265260263 LV4
2022年4月8日
微信网友_5852742079762432 LV6
2022年2月28日
wanglinddad LV55
2022年2月9日