You already implement the ActionListener
interface on your main class ' Ken' , so you don't need the Evt
class in this case.
I'm surprised if that works anyway, because you should get an error as your main class uses implements ActionListener
but doesn't implement the required function.
So implement the actionPerformed
in your main class instead of Evt
and when you attach the a ctionlistener to the button you use this
.
In your action listener you should do
if(e.getSource().equals(oneButton)
but that's not the problem anyway.
And in your event handler you must update the gui element that shows the number. Just setting input to 1 isn't enough. So you should make JTextField text
also a member variable then you can update it's content with this:
input = 1;
text.setText(""+input);
Also you shouldn't make all the elements static. They are declared as class members anyway.