- Get link
- X
- Other Apps
) Create the following GUI screen using appropriate layout managers. Accept the name, class , hobbies of the user and apply the changes and display the selected options in a text box.
import javax.swing.*; import java.awt.*; import java.awt.event.*; class Swing2 extends JFrame implements ActionListener { JLabel l1 , l2 , l3 ; JButton b ; JRadioButton r1 , r2 , r3 ; JCheckBox c1 , c2 , c3 ; JTextField t1 , t2 ; ButtonGroup b1 ; JPanel p1 , p2 ; static int cnt ; private StringBuffer s1 = new StringBuffer (); Swing2 () { b1= new ButtonGroup (); p1= new JPanel (); p2= new JPanel (); ...