Design a simple calculator (called SwingCalculator).
Hints:
· Set the ContentPane to BorderLayout. Add a JTextField (tfDisplay) to the NORHT. Add a JPanel (panelButtons) to the CENTER. Set the JPanel to GridLayout of 4×4, and add the 16 buttons.
· Operator buttons “+”, “-“, “*”, “/”, “%” and “=”.
1 Answer