Jeffrey Rodriguez - UCSC Homework Page
December 2nd, 1999
Homework # 4- Same as homework 3 but a Swing JApplet
Source Calculatorx.java StringDisplay.java
Features:
- Numbers display right to left in text field ( I rewrote this applet from label to
text field).
- Input must be valid for current base. ( To change from base to base press delete
key or CA button) first.
- Invalid number/input should not appear. The invalid input is ignored.
- If move cursor and type should move to outer right.
- Delete key removed last digit typed.
- Clicking button inputs enter the corresponding digits.
- Clear (CA) key clear the display. Clr just acts as the backspace key.
- Number of digits enter per number base is checked. If more than allowed digits you
get error message.
- handles the decimal point.
- Disables the buttons that are invalid for the current base.
- Display "0" upon startup
- Display "0" upon Clr, AC, Deletion of last non-zero key.
- Handles regaining focus to JText from JButton