Essay
import javax.swing.*;
import java.awt.*;
public class JDemoBorderLayout extends JFrame
{
private JButton nb = new JButton("North Button");
private JButton sb = new JButton("South Button");
private JButton eb = new JButton("East Button");
private JButton wb = new JButton("West Button");
private JButton cb = new JButton("Center Button");
private Container con = getContentPane();
public JDemoBorderLayout()
{
con.setLayout(new BorderLayout());
_________________________________________
_________________________________________
_________________________________________
_________________________________________
_________________________________________
setSize(400, 150);
}
public static void main(String[] args)
{
JDemoBorderLayout frame = new JDemoBorderLayout();
frame.setVisible(true);
}
}
Using the above code, write the statements in the shaded lines provided to add components to each of the five regions (north, south, east, west and center).
Correct Answer:

Verified
con.add(nb, BorderLayout.NORTH...View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Correct Answer:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q4: import javax.swing.*;<br>import java.awt.*;<br>public class JDemoGridLayout extends JFrame<br>{<br>private
Q9: The FlowLayout class contains _ constants you
Q11: import java.awt.*;<br>import javax.swing.*;<br>import java.awt.Color;<br>public class JFrameWithColor extends
Q13: The _ manager is the default manager
Q13: Match each term with the correct statement
Q15: Describe the difference between an ActionEvent and
Q17: A(n) _ implements all methods in an
Q41: When you type "A", two _ key
Q45: The parent class for all event objects
Q46: A _ is placed at the top