1 create an instance of gridlayout with 2 rows 3 columns horizontal and vertical gap 5346489

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);


is this right??

please let me know my both answers are right??

thank you so much

"Get 15% discount on your first 3 orders with us"
Use the following coupon

Order Now