Declare and create a jpanel named panelfunctsys

Assignment Help JAVA Programming
Reference no: EM131018078

I am sort on time and upablet ot complet the attached problem and i need help to compelt the work.

//**************************************************************************************************

// CLASS: Main

//**************************************************************************************************

import javax.swing.JFrame;
public class Main {
public static void main(String[] pArgs) {

new Main().run();

}
public void run() {

JFrame.setDefaultLookAndFeelDecorated(true);

View view = new View();

}
}

//**************************************************************************************************

// CLASS: View

//

// DESCRIPTION

// Implements the GUI for a calculator.

//**************************************************************************************************

import java.awt.BorderLayout;

import java.awt.Dimension;

import java.awt.GridLayout;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import javax.swing.Box;

import javax.swing.BoxLayout;

import javax.swing.JButton;

import javax.swing.JFrame;

import javax.swing.JLabel;

import javax.swing.JOptionPane;

import javax.swing.JPanel;

import javax.swing.JTextField;
/**

* Implements the GUI for a calculator.

*/

public class View extends JFrame implements ActionListener {
public static final int FRAME_WIDTH = 500;

public static final int FRAME_HEIGHT = 200;
private JTextField mText;
/**

* Default ctor. Does nothing.

*/

public View() {

// Declare and create a JPanel named panelFunctButton. Set the layout manager to GridLayout

// with 2 rows and 2 columns. Call addButton() to add buttons labeled "x^y", "log 10",

// "log e", and "sqrt".

???
// Declare and create a JPanel named panelSysButton. Use the default FlowLayout layout

// manager. Call addButton() to add buttons labeled "Clear", "About", and "Exit".

???
// Declare and create a JPanel named panelFunctSys. Use the BorderLayout layout manager.

// Add panelFunctButton to the CENTER region. Add panelSysButton to the SOUTH region.

???
// Declare and create a JPanel named panelKeypad. Use the GridLayout layout manager with

// 4 rows and 4 columns. Call addButton() to add the buttons labeled "7", "8", "9", and so

// on.

???
// Declare and create a new JPanel named panelBottom. Use the vertical BoxLayout layout

// manager. Add panelKeypad. Add a 10-pixel wide rigid area (using Box.createRigidArea()).

// Add panelFunctSys.

???
// Declare and create a JPanel named panelTextField. Use the default FlowLayout layout

// manager. Create the mText JTextField making it 30 columns wide. Add mText to the

// panelTextField panel.

???
// Declare and create a JPanel named panelLabel. Use the default FlowLayout layout manager.

// Declare and create a JLabel named label displaying "Kalkutron-9000" or whatever you

// want to display. Add label to panelLabel.

???
// Declare and create a JPanel named panelMain. Use the horizontal BoxLayout layout manager.

// Add some vertical glue to panelMain (using Box.createVerticalGlue()). Add panelLabel.

// Add some more vertical glue. Add panelTextField. Add panelBottom. Add some more vertical

// glue.

???
// Set the title bar string of this JFrame.

setTitle("Kalkutron-9000");
// Set the width and height of this JFrame.

setSize(FRAME_WIDTH, FRAME_HEIGHT);
// Configure this JFrame so the frame will be closed and the application were terminate when

// the X button on the title bar is closed.

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Add panelMain to this JFrame.

add(panelMain);
// Make this JFrame visible.

setVisible(true);

}
/**

* Declare and create a JButton object displaying pText. Make this JFrame the action listener

* for button events. Add the button to pPanel.

*/

private void addButton(JPanel pPanel, String pText) {

JButton button = new JButton(pText);

button.addActionListener(this);

pPanel.add(button);

}
/**

* Implementation of the actionPerformed() method of the ActionListener interface.

*/

@Override

public void actionPerformed(ActionEvent pEvent) {

// If the source of the event is a JButton, calling pEvent.getActionCommand() will return

// the text displayed on the button face. For example, when the Exit button is clicked,

// pEvent.getActionCommand() would return "Exit".
// Write code that determines if the Exit button is the source of the event and if so,

// exit the application by calling System.exit().

???
// Write code that determines if the About button is the source of the event and if so,

// display the about dialog using JOptionPane.showMessageDialog().

???

}
}

Attachment:- Attachment.pdf

Reference no: EM131018078

Questions Cloud

Discuss random sampling and random assignment : Discuss how the psychoanalytic, cognitive, and behavior/social development of the students will affect the way you design and conduct the experiment. Discuss what the experimental and control groups are doing in the study
Define different ways that our culture make people powerless : With reference to Bronfenbrenner and his PPCT model, discuss different ways that our culture makes people powerless or passive in interaction with their environments and thus in their own development.
What is the value of producer surplus in market for bananas : What is the value of producer surplus in the market for bananas when this market is in equilibrium? Show how you calculated this value. Make sure you provide a unit of measurement for your final answer
Common-mode output resistances of the amplifier : Its bias current source has an output resistance RSS = 45 kΩ. The current mirror utilized has a current gain Am of 0.98 A/A and an output resistance Rom of 45 kΩ. If the common-mode output resistances of the amplifier, Ro1 and Ro2, are very large,..
Declare and create a jpanel named panelfunctsys : Declare and create a JPanel named panelFunctSys. Use the BorderLayout layout manager. Add panelFunctButton to the CENTER region. Add panelSysButton to the SOUTH region.
What can we learn from him about empowering our employees : How did Jesus empower his followers to do the work laid out for them? What can we learn from him about empowering our employees?
Write an equation for jason production possibility frontier : Given the above information, write an equation for Jason's production possibility frontier in slope intercept form where jam (J) is measured on the vertical axis and butter (B) is measured on the horizontal axis
Transistors that realize the current sources : For the folded-cascode differential amplifier of Fig. 9.38, find the value of VBIAS that results in the largest possible positive output swing, while keeping Q3: Q4: and the pnp transistors that realize the current sources out of saturation.
What is the equation for this new line : Suppose you are given the following equation: X = 2Y - 4. where X is the variable measured on the horizontal axis and Y is the variable measured on the vertical axis. Suppose that something happens so that for every X value in the original equation..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Update your website to include a simple web form

Update your website to include a simple web form as discussed in your design document. Use JavaScript to validate the form contents and display the results of that validation to the user in a popup window

  Rna hairpins and mirror box drawings

When the program starts up, it should draw a vertical line from the top of the screen to the bot- tom that cleanly divides the window in half. This makes it easier for the user to see the mirror effect.

  Program that lets the user enter four quarterly sales

The figures should be stored in a two-dimensional array. Once the figures arc entered, the program should display the following data for each quarter:

  Print two random integers

Type two statements using nextInt() to print two random integers between 0 and 9. End with a newline. Ex:

  Can we run java byte code on android since android

Can we run java byte code on android since android is also java based

  Assume that you are developing a java program which uses

suppose that youre developing a java program that uses decimal numbers and youd like to control the formatting of your

  Xml assignment help please follow instructions in the

please follow instructions in the attached assignment instructions. ltbrgtplease follow instructions in the attached

  Create the java source code files for the classes listed in

Create an abstract base class, Animal. The single constructor requires a String to indicate the type of animal, which then is stored in an instance variable.

  Teaching software componentization

Describe one way in which one could apply Java graphics in education. Provide one example of such use to support your response and analyze at least three commands that you would use in order to draw a bar chart. Provide a rationale for your respons..

  Have an array of integers with user input instead of given

change the current code to have an array of integers with user input intead of given input from the main where it says int[] a=....; And also from a text file but the same numbers as what is given in main.

  Write a java program using the java graphics

Your task for this assignment is to write a Java program using the Java Graphics class to create an example of a computer generated image. This is an opportunity for you to explore computer graphics and exercise some individual creativity.

  You are to implement an intrusion detection system in java

you are to implement an intrusion detection system in java. we are assuming all activities are associated with the same

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd