This code example shows how to easily display a message dialog using the Swing class JOptionPane.
package org.best.examples.swing;
public class myFrame extends JFrame {
public void displayMessage() {
JOptionPane.showMessageDialog(this,
"The message",
"The Title",
JOptionPane.INFORMATION_MESSAGE);
}
}
package org.best.examples.swing;
public class myFrame extends JFrame {
public void displayMessage() {
JOptionPane.showMessageDialog(this,
"The message",
"The Title",
JOptionPane.INFORMATION_MESSAGE);
}
}
No comments:
Post a Comment