Examlex

Solved

Import Javax.swing.*; Import Java.awt.*;

question 8

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


Definitions:

Program Objectives

Describes the specific, measurable outcomes that a program aims to achieve within a set timeframe.

Nonprofit Organizations

Entities dedicated to furthering a particular social cause or advocating for a shared point of interest without intent to distribute profits to members.

Strategic Planning

The process of defining an organization's direction and making decisions on allocating its resources to pursue this strategy.

Increased Revenue

The growth in the total amount of money earned or received by an organization, typically as a result of enhanced sales or services.

Related Questions