java能写小程序嘛,写一个java小程序

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 !

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值