Write a simple calculator applet that allows a user to perform addition or subtraction of two integer numbers. The applet should have two input fields and one output field. It should also have two buttons to start the calculation.
Create two panels. Add the first panel to the centre of the applet and the second panel to the south. Initialise the three text fields to have empty contents and lengths 10, 10 and 20, make the output field non-editable and add all three fields to the first panel.
Create buttons labelled “+” and “-”and add them to the second panel. Associate appropriate action handlers with the buttons.
What I have tried:
nothing, this is a homework question i require help with
解决方案
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.
Try it yourself, you may find it is not as difficult as you think!
If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!
Quote:nothing, this is a homework question i require help withYou should start to work !
Looks you just want to get credits for a work you haven't done. Pretty rude !