1) Create an instance of GridLayout with 2 rows, 3 columns,horizontal and vertic
ID: 3619255 • Letter: 1
Question
1) Create an instance of GridLayout with 2 rows, 3 columns,horizontal and vertical gaps of 5 pixels.the answer i have
GridLayout layout = new GridLayout (2,3,5,5);
is this right??
2) Create a panel with BorderLayout. Add a button labeled "OK" tothe south side of the panel.
the answer is
JFrame frame = new JFrame();
JPanel panel = new JPanel(new BorderLayout());
JButton button = new JButton("OK");
panel.add(button, BorderLayout.SOUTH);
frame.add(panel);
is this right??
please let me know my both answers are right??
thank you so much
Explanation / Answer
Absolutely Right!
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.