📜  java jpanel message 错误消息 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:18.659000             🧑  作者: Mango

代码示例1
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

  }