在Java Swing编程中,程序员还可以自定义对话框,一般可以从JDialog类来继续。下面给出一个对话框类的代码:
class HelpAbout extends JDialog implements ActionListener
{
JavaWord mainFrame;
JButton okButton;
javax.swing.Timer myTimer;
int Counter=0;
public HelpAbout(JavaWord mainFrame)
{
super(mainFrame,"关于本程序的说明",true); //true 代表为有模式对话框
this.mainFrame= mainFrame;
JPanel contentPanel=new JPanel();
contentPanel.setLayout(new BorderLayout());
JLabel imageLabel=new JLabel(new ImageIcon(".imagesjavaLogo.gif")...[ 查看全文 ]