1 2 import java.awt.*; 3 import java.awt.event.*; 4 import javax.swing.*; 5 6 void jButton1_actionPerformed(ActionEvent e) { 7 JFrame frame = new JFrame(); 8 9 String message = "www.DevSuperPage.com"; 10 11 // Message with OK button 12 JOptionPane.showMessageDialog(frame, message); 13 14 //message with confirm button 15 JOptionPane.showConfirmDialog(frame,message); 16 17 //message with input 18 String sText= JOptionPane.showInputDialog(frame,message); 19 JOptionPane.showMessageDialog(frame,"You said "+sText); 20 21 }