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

📄 messagebox.java

📁 tinyos最新版
💻 JAVA
字号:
package net.tinyos.task.spy;import java.awt.*;import java.io.*;import java.awt.event.*;public class MessageBox extends Dialog implements ActionListener, WindowListener {    MessageBox(Frame parent, String title, String message) {	super(parent, title, true);	addWindowListener(this);	setLayout(new GridBagLayout());	GridBagConstraints c1 = new GridBagConstraints();	c1.gridy = 0;	add(new Label(message), c1);	GridBagConstraints c2 = new GridBagConstraints();	c2.gridy = 1;	Button ok = new Button("Ok");	add(ok, c2);	ok.addActionListener(this);	pack();	show();    }        public void actionPerformed(ActionEvent e) {	dispose();    }    public void windowClosing(WindowEvent e) {	dispose();    }    public void windowClosed(WindowEvent e) { }    public void windowActivated(WindowEvent e) { }    public void windowIconified(WindowEvent e) { }    public void windowDeactivated(WindowEvent e) { }    public void windowDeiconified(WindowEvent e) { }    public void windowOpened(WindowEvent e) { }}

⌨️ 快捷键说明

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