⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aboutdialog.java

📁 好的超市源码供大家下载
💻 JAVA
字号:
package view.dialog;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;

/**
 * 关于对话框
 * @author linfeng
 *
 */
public class AboutDialog extends JDialog implements ActionListener {
  
  /**
   * dialog 对话框
   * aboutLabel 关于标签
   * message 版权标签
   * button 确定按钮
   */
  private JDialog dialog;
  private JLabel aboutLabel,version;
  private JButton button;

  public AboutDialog() {
    dialog = new JDialog();
    dialog.setSize(150,100);
    dialog.setLocation(280,50);
    dialog.setTitle("关于");
    aboutLabel = new JLabel("超市管理系统1.0版", JLabel.CENTER);
    button = new JButton("确定");
    button.addActionListener(this);
    version = new JLabel("版权所有,2008年4月");
    dialog.setLayout(new FlowLayout());
    dialog.add(aboutLabel);
    dialog.add(button);
    dialog.add(version);
    dialog.setVisible(true);
    
  }

  public void actionPerformed(ActionEvent e) {
    if (e.getActionCommand().equals("确定")) {
      dialog.dispose();
    }
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -