Action Listener - Practice(simple calculator)
Action Listener - Practice(simple calculator) Example 1 - Process oriented programming package com . LILRICH . lesson2 ; import java . awt . * ; import java . awt . event . ActionEvent ; import java . awt . event . ActionListener ; public class CalOPP { public static void main ( String [] args ) { new OppFrame (); } } //Frame class OppFrame extends Frame { public OppFrame () { //1. TextField TextField num1 = new TextField ( 10 ); TextField num2 = new TextField ( 10 ); TextField num3 = new TextField ( 20 ); //2. Label Label label = new Label ( "+" ); //3. Button & action listener Button button = new Button ( "=" ); O...