Display question message dialog with JOptionPane.QUESTION_MESSAGE
import javax.swing.JOptionPane;
import javax.swing.JPanel;
public class JOptionPaneQUESTION_MESSAGE {
public static void main(String[] args) {
final JPanel panel = new JPanel();
JOptionPane.showMessageDialog(panel, "Are you sure to quit?", "Question",
JOptionPane.QUESTION_MESSAGE);
}
}
Related examples in the same category