Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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

  }
Source by www.java2s.com #
 
PREVIOUS NEXT
Tagged: #java #jpanel #message #error #messages
ADD COMMENT
Topic
Name
7+8 =