Public Member Functions | |
| void | init () |
| Applet method. | |
| void | setup () |
| Sets up the calculator using CalculatorApplet. | |
| void | actionPerformed (java.awt.event.ActionEvent actionEvent) |
| The calculator is set up but initially invisible. | |
Private Attributes | |
| javax.swing.JFrame | frame |
| A JFrame to hold the calculator. | |
It illustrates at least one possible way to use the calculator: as an object that appears when required so you can calculate a value. Since we’ve found a value, we can then ask CalculatorApplet to send the value to some application of interest (typically a JTextField). In fact this was the original purpose of the calculator.
| void jscicalc.CalcButtonApplet.init | ( | ) |
Applet method.
Create a calculator on the event-dispatching thread.
References jscicalc.CalcButtonApplet.setup().
| void jscicalc.CalcButtonApplet.setup | ( | ) |
Sets up the calculator using CalculatorApplet.
References jscicalc.CalcButtonApplet.frame.
Referenced by jscicalc.CalcButtonApplet.init().
| void jscicalc.CalcButtonApplet.actionPerformed | ( | java.awt.event.ActionEvent | actionEvent | ) |
The calculator is set up but initially invisible.
Pressing the button changes the state of the calculator to visible or back to invisible.
| actionEvent | The event of the button being pressed |
References jscicalc.CalcButtonApplet.frame.
javax.swing.JFrame jscicalc.CalcButtonApplet.frame [private] |
A JFrame to hold the calculator.
Referenced by jscicalc.CalcButtonApplet.actionPerformed(), and jscicalc.CalcButtonApplet.setup().
1.5.5