Question: Which of the following outputs generated by the code given below? private void initialize() { frame new JFrame(); frame.setBounds (100, 100, 450, 300); frame.setDefaultCloseOperation
Which of the following outputs generated by the code given below? private void initialize() { frame new JFrame(); frame.setBounds (100, 100, 450, 300); frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); frame.setLayout(new GridLayout(4, 1)); Label 1blEnter YourName frame.add(lblEnterYourNane); new 3Label("Enter your name"); txtAlexNickola new JTextField(); txtAlexNickola.setText("Alex Nickola"); frame.add(txtAlexNickola); txtAlexNickola.setColumns(10); JCheckBox chckbxStudent new 3CheckBox("Student"); chckbxStudent.setSelected(true); frame.add(chckbxStudent); JPanel pnl new Panel(); frame.add(pnl); JRadioButton rdbHigh new JRadioButton("High School"); JRadioButton rdbMaster new JRadioButton("Master"); JRadioButton rdbPhD new JRadioButton("PhD"); rdbPhD.setSelected(true); pnl.add(rdbHigh); pnl.add(rdbMaster); pnl.add(rdbPhD);
Step by Step Solution
3.43 Rating (172 Votes )
There are 3 Steps involved in it
There are multiple errors and inconsistencies in the provided code snippet so lets correct them firs... View full answer
Get step-by-step solutions from verified subject matter experts
