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());
-----Code here-----
-----Code here-----
-----Code here-----
-----Code here-----
-----Code here-----
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 indicated lines 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
Q56: Describe the difference between an ActionEvent and
Q57: Q58: What are the four methods defined in Q59: import javax.swing.*; Q60: List and describe the four constructors that Q61: Write the statement to establish a GridLayout
import java.awt.*;
import java.awt.event.*;
public
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