📅  最后修改于: 2022-03-11 14:52:18.659000             🧑  作者: Mango
import javax.swing.JOptionPane;
import javax.swing.JPanel;
public class JOptionPaneERROR_MESSAGE {
public static void main(String[] args) {
final JPanel panel = new JPanel();//create new Jpannel
JOptionPane.showMessageDialog(panel,
"Could not open file", "Error", JOptionPane.ERROR_MESSAGE);
//show gui message in object panel, message with ERROR icon and Error text
}