Reference: Learn Java Tutorial 1.34- ActionListener and JOptionPane Class: FirstWindow Class: StartHere Result: New window with 3 panels: “south” panel has buttons; “north” panel has checkboxes; and “center” panel has a label, text area, &
For the flexibility you seem to want you should have your class extend JFrame instead of JDialog. Then declare your buttons as JButtons: JButton saveButton = new JButton("Save"); and add an actionListnener to this button: saveButton.addActionLis
Sr.No. Constructor & Description; 1: JOptionPane() Creates a JOptionPane with a test message. 2: JOptionPane(Object message) Creates a instance of JOptionPane to display a message using the plain-message message type and the default options delivered
Post a Comment:
Showing 0 Comments: