/************************************************** * Author: Morrison * Date: 12 Apr 202021 **************************************************/ import javafx.application.Application; import javafx.application.Platform; import javafx.stage.Stage; import javafx.scene.Scene; public class RPN extends Application { private final TextArea display; private NumberButton[] digits; private NumberButton decimalPoint; private NumberButton exponent; public RPN() { display = new TextArea(); display.setText(0,0); digits = new NumberButton[10]; for(int k = 0; k < 10; k++) { digits[k] = new NumberButton("" + ( (char) 0x30 + k)); } decimalPoint = new NumberButton('.'); } @Override public void init() { } @Override public void start(Stage primary) { primary.show(); } @Override public void stop() { } /********************** Inner Classes ********************/ class NumberButton extends Button { private final char num; public Button(char num) { super("" + num); this.num = num; } } class OpButton extends Button { } class FunctionButton extends Button { } }