Answers for "java jpanel message error messages"

1

java jpanel message error messages

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

  }
Posted by: Guest on December-18-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language