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
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q44: What is a mnemonic? Provide an example
Q46: Write the statement to set the background
Q51: Write the code to create a scroll
Q60: Match each term with the correct statement
Q60: List and describe the four constructors that
Q61: Write the statement to establish a GridLayout
Q62: import javax.swing.*;
import java.awt.*;
public class JDemoGridLayout extends JFrame
{
private
Q64: Using a FlowLayout object named myLayout ,
Q65: import java.awt.*;
import javax.swing.*;
import java.awt.Color;
public class Checkerboard extends
Q69: import java.awt.*;
import javax.swing.*;
import java.awt.Color;
public class JFrameWithColor extends
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents