Question: Modify the code to give South and East, with the East Panel having four radio buttons, and the South panel having five check boxes. Also,

Modify the code to give South and East, with the East Panel having four radio buttons, and the South panel having five check boxes. Also, take the West panel and add a text field with text colored blue and in italics.

Source Code:

import javax.swing.*;

import java.awt.*;

class Layout extends JFrame

{

Container contentPane = getContentPane();

JPanel pnl = new JPanel();

JPanel grid = new JPanel(new GridLayout(2,2));

public Layout()

{

super( "Swing Window" );

setSize( 500,200 );

setDefaultCloseOperation( EXIT_ON_CLOSE );

pnl.add(new JButton("Yes") );

pnl.add(new JButton("No") );

pnl.add(new JButton("Cancel") );

grid.add(new JButton("1"));

grid.add(new JButton("2"));

grid.add(new JButton("3"));

grid.add(new JButton("4"));

contentPane.add("North", pnl );

contentPane.add("Center", grid );

contentPane.add("West",new JButton("West"));

setVisible( true );

}

public static void main( String[] args )

{

Layout gui = new Layout() ;

}

}

Output:

Modify the code to give South and East, with the East Panel

Picture Tools Ex 10A Microsoft Word Insert Page Layout References Mailings Review View Format Find AaBbccDo AaBbci AaBbco AaB AaBbCCD AaBbCc Copy Replace Paste Format Painter B I u ale xa x' Aa A EE E EE 1 Norm 1 No spaci... Heading 1 Heading 2 Title Subtitle Subtle Em Emphasis F Ch Select Styles clipboard Font Paragraph Editing Swing window Words: 0 Page: English (United States) 2-27 PM 1x ENG Ask me anything 3/10/2017 R20

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!