Java tutorial
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); } }