📄 messageboxlistener.java
字号:
/*
* Created on 2004-5-29
*/
/**
* @author Zhou Qi
* @Use to handle different MessageBox event
*/
import java.awt.event.*;
import javax.swing.*;
import java.awt.*;
public class MessageBoxListener
{
public static void main(String args[])
{}
}
class MessageBoxEmpty
{
public void actionPerformed(ActionEvent e)
{
JButton myjb=(JButton)e.getSource();
String empty="UserName and Password fields must be filled!";
JOptionPane.showConfirmDialog(null,empty,"Invalid Input",JOptionPane.ERROR_MESSAGE);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -