|
| |
精品推荐 |
 |
|
| |
|
|
|
|
用Java编写的记事本程序(3)
|
日期:2008年6月3日 作者: 查看:[大字体
中字体 小字体]
|
class Pop_undo_actionAdapter implements java.awt.event.ActionListener{ Jsb adaptee; Pop_undo_actionAdapter(Jsb adaptee){ this.adaptee=adaptee; } public void actionPerformed(ActionEvent e){ adaptee.pop_undo_actionPerformed(e); } }
class Pop_cut_actionAdapter implements java.awt.event.ActionListener{ Jsb adaptee; Pop_cut_actionAdapter(Jsb adaptee){ this.adaptee=adaptee; } public void actionPerformed(ActionEvent e){ adaptee.pop_cut_actionPerformed(e); } }
class Pop_copy_actionAdapter implements java.awt.event.ActionListener{ Jsb adaptee; Pop_copy_actionAdapter(Jsb adaptee){ this.adaptee=adaptee; } public void actionPerformed(ActionEvent e){ adaptee.pop_copy_acionPerformed(e); } }
class Pop_paste_actionAdapter implements java.awt.event.ActionListener{ Jsb adaptee; Pop_paste_actionAdapter(Jsb adaptee){ this.adaptee=adaptee; } public void actionPerformed(ActionEvent e){ adaptee.pop_paste_actionPerformed(e); } }
class Pop_delete_actionAdapter implements java.awt.event.ActionListener{ Jsb adaptee; Pop_delete_actionAdapter(Jsb adaptee){ this.adaptee=adaptee; } public void actionPerformed(ActionEvent e){ adaptee.pop_delete_actionPerformed(e); } }
/******************* Event class end **********************************/ /************************************************************* * title: DlgText.java * author: jeason * date: 2004-12-21 **************************************************************/ package jeason;
import java.awt.*; import java.awt.event.*; import javax.swing.*;
public class Dlgtext extends JDialog{ private boolean check=false;
JLabel text=new JLabel( ); JButton btnOk=new JButton( ); JButton btnNo=new JButton( );
FlowLayout flowLayout1=new FlowLayout();
Dlgtext(){ this(null,"",false); }
Dlgtext(Frame frame, String title, boolean modal){ super(frame,title,modal);
text.setText(" 你要保存吗? "); text.setSize(200,60);
this.setSize(200,80); this.setModal(true);
btnOk.setText("确定(Y)"); btnOk.setMnemonic(´Y´); btnOk.setSize(100,20); btnOk.addActionListener(new btnOk_actionAdapter(this));
btnNo.setText("取消(N)"); btnNo.setMnemonic(´N´); btnNo.setSize(100,20); btnNo.addActionListener(new btnNo_actionAdapter(this));
上一篇:用Java编写的记事本程序(2)
下一篇:用Java编写扫雷游戏--代码思想
|
| 相关文章: |
|
|
|
| 相关软件: |
|
|
|
|