all i did was add this in your code and ran it
//your code
originalDeposit = new JLabel("Enter amount of original deposit");
originalField = new JTextField(7);// <----- here...
Type: Posts; User: william
all i did was add this in your code and ran it
//your code
originalDeposit = new JLabel("Enter amount of original deposit");
originalField = new JTextField(7);// <----- here...
exactly, timefield is a variable needs to be initialized timeField = new JTextField() some where. Its not your trying to use a null JTextField
don't forget to
public static void main(String args[]){
calculator cal = new calculator();
cal.setVisible(true);
}
the error tells you where you have not initialized the variable Line 62 see below
timeField = new JTextField();