Question: Short Answer 11. (4 marks) Consider the follow code snippet: //Assume appropriate imports public SomeGUI //Assume statements to set size, exit //condition and visibility are
Short Answer 11. (4 marks) Consider the follow code snippet: //Assume appropriate imports public SomeGUI //Assume statements to set size, exit //condition and visibility are present. JPanel panel- new JPanel (new GridLayout (4,1)) JTextField textField! = new JTextField(5); JLabel labell new JLabel ("Input") JLabel label2 = new JLabel ("Answer"); JButton buttonl new JButton ("Go!" panel.add (1abe11) panel.add (textFieldl): panel.add (labe12): panel.add (buttonl) add (panel) //Assume main method that creates an object //according to the code above. Draw a sketch of what the GUI will look like
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
