StudentShare solutions
Triangle menu

Java Programming - Math Problem Example

Nobody downloaded yet

Extract of sample
Java Programming

Java Swing Calculator

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JOptionPane;

public class Calculator extends JFrame implements ActionListener
// Variables
final int MAX_INPUT_LENGTH = 20;
final int INPUT_MODE = 0;
final int RESULT_MODE = 1;
final int ERROR_MODE = 2;
int displayMode;

boolean clearOnNextDigit, percent;
double lastNumber;
String lastOperator;

private JMenu jmenuFile, jmenuEdit, jmenuView, jmenuHelp;
private JMenuItem jmenuitemExit, jmenuitemCopy, jmenuitemPaste, jmenuitemStd,
jmenuitemSci, jmenuitemDigitGrp, jmenuitemAbout;
private JDialog dialog;

private JLabel display;
private JButton button[];
private JPanel masterPanel;
private JTextArea textarea;

Font f12 = new Font("Times New Roman", 0, 12);
Font f121 = new Font("Times New Roman", 1, 12);

jmenuitemSci = new JMenuItem("Scientific");

jmenuitemDigitGrp = new JMenuItem("Digit Grouping");

jmenuHelp = new JMenu("Help");

jmenuitemAbout = new JMenuItem("About Calculator");

JMenuBar mb = new JMenuBar();
// mb.add(jmenuFile);

//Set frame layout manager


* Font(String name, int style, int size)
Creates a new Font from the specified name, style and point size.

//adds menubar to frame (end)

masterPanel = new JPanel();

display = new JLabel("0");

Container contentPane = getContentPane();

// Add components to frame
contentPane.add(display, BorderLayout.NORTH);

button = new JButton[23];

JPanel backSpace = new JPanel();
backSpace.setLayout(new GridLayout(1, 1, 2, 2));

button[20] = new JButton("Backspace");

JPanel control = new JPanel();
control.setLayout(new GridLayout(1, 2, 2 ,2));

button[21] = new JButton(" CE ");
button[22] = new JButton("C");

control.add(button[22]); ...Show more


The current paper "Java Programming" is primarily purposed to give a full Java program on the assignment on Programming. This particular program fully satisfies standards and rules of programming and is also good enough for degree level assignment…
Author : gutmannkaelyn
Java Programming essay example
Read Text Preview
Save Your Time for More Important Things
Let us write or edit the math problem on your topic
"Java Programming"
with a personal 20% discount.
Grab the best paper

Check these samples - they also fit your topic

Risk assessment plan
From the research it is clear that probabilistic risk analysis (PRA) or quantitative risk analysis (QRA) or probabilistic safety analysis (PSA) is one of the most used methods of analysing risk in project development and operation. The use of this technique supports and validates the improvement of control and mitigation measures against threats.
19 pages (4750 words) Math Problem
Quantative analysis for business
The technique revolves around five (5) simple steps. These steps are: i. Setting up a probability distribution for each of the three variable – material cost, labor cost and utilities cost ii. Preparing a cumulative probability distribution for each of the three variables iii.
16 pages (4000 words) Math Problem
Algebra Math Problem
Application: Matthew would like to put up a small coffee-bean store selling two special varieties of coffee – Arabica(M) and Robusta(H). He estimates obtaining profit from each kg of Arabica(M) worth $10.50 and from each kg of Robusta(H) costing $9.25. If he desires to have 2500 kgs of bean-mixture sold for $9.74 per kg, how much of each kind must be present in the mixture?
6 pages (1500 words) Math Problem
Projects 1,3,5
The Hotpoint Front Control Dishwasher in White is $289.00 at Home Depot. It is not classified as energy efficient. The GE 24in. Front Control Dishwasher in Black with Steam PreWash is on sale this week for $359.10 at Home Depot, from a normal price of $399.00, and is classified as energy efficient.
3 pages (750 words) Math Problem
Numerical analysis
These types of problems (especially systems of differential equations) are solved numerically using a number of similar algorithms which are based on the principles of numerical integration. The definition of the task "solve differential equation" means "integrate differential equation" so all differential equation numerical solving techniques are based on numerical integration, which is the problem of finding area under the curve described by differentiated function.
6 pages (1500 words) Math Problem
Automation Tools Math Problem
A new, above shown window, which is actually a code editor for visual basic (VBA IDE), will appear. In this new window, go to option View Object Browser (shortcut key: F2). This action will change the interface of the window; select 'VBA' from the drop-down list of combo box (encircled in red) as shown in figure below.
11 pages (2750 words) Math Problem
Linear Programming in relationship to the Profit Maximization of the Business
The co-ordinates of A and B are (5250000, 5250000) and (6, 6) respectively. The value of the objective function at these points is 0.45 X 5250000 = 2362500 and 2.7 respectively. The value of the objective function at the points of ray AD beyond point A would be 0.2x + 0.25(10500000 - x) i.e.
3 pages (750 words) Math Problem
A Linear Programming
4 pages (1000 words) Math Problem
Theorem of Pythagoras in Mathematics
If we read the history of Pythagoras we would come to know his influence upon other philosophers like Plato's whole theory is very much affected by his thinking about geometry. He develops it in books VI and VII of the Republic, and says that "what we are talking about in geometry and mathematics, which are generally abstract entities of timeless, spaceless, and impersonal theologies.
12 pages (3000 words) Math Problem
Job selection-multiple criteria decision analysis
She has excellent curriculum vitae with a high grade point average and a strong record of campus participation in clubs and activities. As a result, she has had a number of good interviews with various companies. She now has
7 pages (1750 words) Math Problem
Hire a pro to write
a paper under your requirements!
Win a special DISCOUNT!
Put in your e-mail and click the button with your lucky finger
Your email
Comments (0)
Click to create a comment
Contact Us