()==twelf)//字号12 size=12; if(e.getSource()==fiveteen)//字号15 size=15; if(e.getSource()==eighteen...)//字号18 size=18; if(e.getSource()==twenty)//字号20 size=20; if(e.getSource()==song)//字体宋体...style="宋体"; if(e.getSource()==hei)//字体黑体 style="黑体"; if(e.getSource()==kai)//字体楷体 style="...楷体"; if(e.getSource()==chang)//字形常规 pattern=Font.PLAIN; if(e.getSource()==jia)//字形加粗 pattern...if(e.getSource()==green)//颜色绿色 text01.setForeground(Color.green); if(e.getSource()==blue)//颜色蓝色
result = 0; //@Override public void actionPerformed(ActionEvent e) { if(e.getSource...== buttondot) { label.setText("0."); } else if(e.getSource...arg2 = Double.parseDouble(label.getText()); } else if(e.getSource...arg2 = Double.parseDouble(label.getText()); } else if(e.getSource...arg1 = arg2; flag = 0; } else if(e.getSource
43 } 44 45 if(e.getSource()==keysave){ 46 47 this.keysave(); 48 49 } 50 51 if(e.getSource(...3.3 编辑事件监听 if(e.getSource()==copy){ this.copy(); } if(e.getSource()==paste){ this.paste...(); } if(e.getSource()==cut){ this.cut(); } if(e.getSource()==search){ Sear_chdialog.setVisible...(true); } if(e.getSource()==searchok){ this.search(); } if(e.getSource()==searchcancel){...} if(e.getSource()==changeall){ this.changeall(); } if(e.getSource()==delete){ This.delete
()==item01){//宋体 text01.setFont(new Font("宋体",Font.PLAIN,14)); } if(e.getSource...()==item03){//玫红色 text01.setForeground(new Color(255,0,255)); } if(e.getSource...){//绿色 text01.setForeground(new Color(0,100,0)); } if(e.getSource()==item06...){//黑色 text01.setForeground(Color.BLACK); } if(e.getSource()==item08){//换壁纸 photoNum...()==item09){//退出 dispose(); } if(e.getSource()==btn_next){//下一页 if(papeNum<s.length){//不是最后一页 papeNum
ActionEvent e) { // TODO Auto-generated method stub for(int i=0;i<5;i++){ if(e.getSource...showMychoice(num);//显示已选选项 showButton(num);//判断显示哪些按钮 } } (1)实现上一题功能 if(e.getSource...my_answer[num]=1; btn_index[num].setBackground(Color.GREEN); } if(e.getSource...my_answer[num]=2; btn_index[num].setBackground(Color.GREEN); } if(e.getSource...my_answer[num]=3; btn_index[num].setBackground(Color.GREEN); } if(e.getSource
implements ActionListener { public void actionPerformed(ActionEvent e) { if(e.getSource...()==button_split) { new Split(); }else if(e.getSource()==button_merge) { new...Merge(); }else if(e.getSource()==button_help) { new Help(); }else if(e.getSource
); } else if(e.getSource()==item16){//监听"文字黑色"事件 area.setForeground(Color.black); } else if(e.getSource...()==item17){//监听"文字绿色"事件 area.setForeground(Color.green); } else if(e.getSource()==item18){//监听"文字黄色"...事件 area.setForeground(Color.yellow); } else if(e.getSource()==item19){//监听"Size30"事件 area.setFont(new...Font("宋体",0,30)); } else if(e.getSource()==item20){//监听"Size40"事件 area.setFont(new Font("宋体",0,40));...} else if(e.getSource()==item21){//监听"Size50"事件 area.setFont(new Font("宋体",0,50)); } else if(e.getSource
3.重新开始事件处理代码如下所示 if(e.getSource()==item01){//重新开始 initGame(); for(int i=0;i<...()==item02){//退出游戏 dispose(); } 5.游戏级别事件处理(入门、6x6、7x7、8x8)代码如下所示 if(e.getSource()==radio_level.../入门 beginnerLevel(); radio_level[0].setSelected(true); } if(e.getSource...){//6*6 setLevel(6); radio_level[1].setSelected(true); } if(e.getSource..., "游戏规则",JOptionPane.INFORMATION_MESSAGE); } if(e.getSource()==item05){//关于 JOptionPane.showMessageDialog
}else{ JOptionPane.showMessageDialog(Login.this,"不是系统的合法用户或密码错误" ); } }else if(e.getSource...DormitoryBuilder() .addDormitoryId(id.getText().trim()) .CreateDormitory(); jdbcDormitory js...=new jdbcDormitory(); try { js.dormitoryQuery("where Dnumber ="+"'"+""+d.getDormitoryId()+"'")...; if(Integer.parseInt(js.getDormitory().get(0).getDormitoryPeopleNow())!...=0){ JOptionPane.showMessageDialog(dormitoryUpdateUi.this, "宿舍有成员居住,无法删除"); }else{ js.dormitoryDelete
TODO Auto-generated method stub //添加事件处理代码 for(int i=0;i<9;i++){ if(e.getSource...if(e.getSource()==btn_cancel){ for(int i=0;i<9;i++){ check[i].setSelected...; label03.setText("满30免费配送,满100立减10"); } 以上e.getSource()...在Takeout()类构造函数中if(e.getSource()==btn_ok)添加以下的代码。...在Takeout()类构造函数中if(e.getSource()==btn_ok)添加以下的代码。 Takeout(){ .....
()).getText(); store = (JButton) e.getSource(); vt.add(store);...") public void actionPerformed(ActionEvent e) { String ss2 = ((JButton) e.getSource...()).getText(); store = (JButton) e.getSource(); vt.add(store);...unchecked") public void actionPerformed(ActionEvent e) { store = (JButton) e.getSource...unchecked") public void actionPerformed(ActionEvent e) { store = (JButton) e.getSource
double num2=Double.parseDouble(jtf2.getText()); double res=0; if(e.getSource...()==j1){ res=num1+num2; }else if(e.getSource()==j2){ res=...num1-num2; }else if(e.getSource()==j3){ res=num1*num2; }else...if(e.getSource()==j4){ res=num1/num2; } jtf3.setText(res+"");
图4-1 图书管理系统管理员 主要程序代码如下: public void actionPerformed(ActionEvent e) { if(e.getSource()==itemAdmiqh...) { this.dispose(); In winin=new In("系统登陆"); } if(e.getSource()==itemtc) { System.exit(0); } if(e.getSource... wintable=new WinTable("管理日志"); } if(e.getSource()==itemBookrk) { AddInfy addInfy=new AddInfy(); } if...(e.getSource()==itemPersonlr) { Winpersonadd winperson=new Winpersonadd("读者添加"); } if(e.getSource()==...} if(e.getSource()==itemchaoshi) { day win=new day(); } if(e.getSource()==itemBorrowjs) { Borrowbook
ls.addItemListener(this); add(ls); } public void itemStateChanged(ItemEvent e){ if (e.getSource...// getSource()方法:返回当前动作所指向的对象,包含对象的所有信息,而getActionCommond()是指当前动作指向的对象的名称 } if (e.getSource...() == cb2){ showColor = Color.yellow; } if (e.getSource() == cb3){...showColor = Color.blue; } if (e.getSource() == cb4){ showColor = Color.black...pan2.addContainerListener(this); } public void actionPerformed(ActionEvent e){ if (e.getSource
() == dorp_down_hours) { 815 valueJudgment(); 816 } 817 if (e.getSource...() == stop) { 824 stopActionPerformed(); 825 } 826 if (e.getSource() =...running; 869 } 870 if (e.getSource() == uploadRing) { 871 // 上传文件 872...() == changeBackground) { 885 changeBG(); 886 } 887 if (e.getSource()...()==exit){ 65 //退出系统 66 AlarmFile.exit(); 67 }else if (e.getSource
implements ActionListener { public void actionPerformed(ActionEvent e) { Color color_temp = ((Button)e.getSource.../ class ButtonCursor extends MouseAdapter { public void mouseEntered(MouseEvent e) { ((Button)e.getSource...setCursor(new Cursor(Cursor.HAND_CURSOR)); } public void mouseExited(MouseEvent e) { ((Button)e.getSource...implements ActionListener { public void actionPerformed(ActionEvent e) { Button button_temp = (Button) e.getSource
QueryFrame("Unicode字符查询器"); } @Override public void actionPerformed(ActionEvent e) { if(e.getSource...getText(); char ch = str.charAt(0); tfd2.setText(""+(int)ch); }else if(e.getSource
() == findNextJButton) { 134 findNextOperation(); 135 } else if (e.getSource() ==...() == news) { 390 FileMenuUtil.news(MainUI.this); 391 } else if (e.getSource() ==...() == save) { 395 FileMenuUtil.save(MainUI.this); 396 } else if (e.getSource() ==...saveAs) { 397 FileMenuUtil.saveAs(MainUI.this); 398 } else if (e.getSource() ==...(); 414 } else if (e.getSource() == cut) { 415 EditMenuUtil.cut(); 416 }
true); } 那么接下来的步骤就非常简单了,对里面的控件进行事件的监听: @Override public void actionPerformed(ActionEvent e) { if (e.getSource...; } } else if (e.getSource() == nextButton) { // 处理下一题逻辑 currentRiddleIndex...setVisible(true); } @Override public void actionPerformed(ActionEvent e) { if (e.getSource...; } } else if (e.getSource() == nextButton) { // 处理下一题逻辑
// TODO Auto-generated method stub 91 //System.out.println(e.getActionCommand()); 92 if(e.getSource...()==button[0]||e.getSource()==button[1]) 93 { 94 if(e.getSource()==button[0]){ 95...} 99 } 100 else str=""; 101 } 102 else 103 { 104 if(e.getSource
领取专属 10元无门槛券
手把手带您无忧上云