Create the following GUI You do not need to provide any func

Create the following GUI. You do not need to provide any functionality.

Solution

import java.awt.*;

import javax.swing.*;

public class AppletLayout extends JApplet

{

private JComboBox selModeCombo;

private JButton ok;

private JButton cancel;

private JButton setup;

private JButton help;

private String[] selectionModelString = {\"High\"};

public void init()

{

try

{

SwingUtilities.invokeLater(new Runnable()

{

public void run()

{

createAndDisplayGUI();

}

});

}

catch(Exception e)

{

System.err.println(\"Unable to Create and Display GUI : \" + e.getMessage());

e.printStackTrace();

}

}

private void createAndDisplayGUI()

{

JTextArea textArea = new JTextArea(

\" \"

);

JLabel selModeLabel = new JLabel(\"Print Quality\", JLabel.LEFT);

selModeCombo = new JComboBox(selectionModelString);

JCheckBox image=new JCheckBox(\"Image\",false);

JCheckBox text=new JCheckBox(\"Text\",false);

JCheckBox code=new JCheckBox(\"Code\",false);

JCheckBox printtofile=new JCheckBox(\"Print To File\",false);

JRadioButton Selection=new JRadioButton(\"Selection\",false);

JRadioButton All=new JRadioButton(\"All\",true);

JRadioButton Applet=new JRadioButton(\"Applet\",false);

ok = new JButton(\"Ok\");

cancel = new JButton(\"Cancel\");

setup = new JButton(\"Setup\");

help = new JButton(\"Help\");

JComponent contentPane = (JComponent) getContentPane();

// JPanel topPanel = new JPanel();

// topPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));

// topPanel.setLayout(new GridLayout(0, 1, 5, 5));

// topPanel.setLayout(new GridLayout(0, 2));

JPanel combopanel = new JPanel();

combopanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));

combopanel.setLayout(new GridLayout(0, 1, 5, 5));

combopanel.add(selModeLabel);

combopanel.add(selModeCombo);

JPanel textPAnel = new JPanel();

textPAnel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));

textPAnel.setLayout(new GridLayout(0, 1, 5, 5));

textPAnel.add(textArea);

JPanel textPAnel1 = new JPanel();

textPAnel1.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));

textPAnel1.setLayout(new GridLayout(0, 1, 5, 5));

textPAnel1.add(textArea);

JPanel buttonPanel = new JPanel();

buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));

//buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.Y_AXIS));

buttonPanel.setLayout(new GridLayout(0, 1, 5, 5));

buttonPanel.add(ok);

buttonPanel.add(cancel);

buttonPanel.add(setup);

buttonPanel.add(help);

JPanel chkboxpanel=new JPanel();

chkboxpanel.setLayout(new GridLayout(0, 1, 5, 5));

chkboxpanel.add(image);

chkboxpanel.add(text);

chkboxpanel.add(code);

chkboxpanel.add(printtofile);

JPanel radiopanel=new JPanel();

radiopanel.setLayout(new GridLayout(0, 1, 5, 5));

radiopanel.add(Selection);

radiopanel.add(All);

radiopanel.add(Applet);

JPanel mainPanel = new JPanel();

mainPanel.setLayout(new BorderLayout(5, 5));

mainPanel.add(combopanel,BorderLayout.PAGE_END);

mainPanel.add(textPAnel,BorderLayout.BEFORE_FIRST_LINE);

mainPanel.add(chkboxpanel,BorderLayout.LINE_START);

// mainPanel.add(textPAnel1,FlowLayout.CENTER);

mainPanel.add(radiopanel,BorderLayout.CENTER);

mainPanel.add(buttonPanel, BorderLayout.LINE_END);

contentPane.add(mainPanel, BorderLayout.PAGE_START);

setSize(1000, 1000);

}

}

 Create the following GUI. You do not need to provide any functionality. Solutionimport java.awt.*; import javax.swing.*; public class AppletLayout extends JApp
 Create the following GUI. You do not need to provide any functionality. Solutionimport java.awt.*; import javax.swing.*; public class AppletLayout extends JApp
 Create the following GUI. You do not need to provide any functionality. Solutionimport java.awt.*; import javax.swing.*; public class AppletLayout extends JApp

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site