By Shan Wang on 四月 14, 2009
During NetBeans 6.5,you can do the GUI design very quickly and it's very convenient for you to use.You can work out the project by just drafting the swing components.
Before get started,you should install NetBeans 6.5(6.7 Milestone 1/2/3 is also okay) and JDK 6(or higher edition) on your computer.
This time I'd like to do a simple calculator with NetBeans 6.5.
First of all,just oepn NetBens 6.5,choose Javase,create a new java desktop application, name for your project and make it the main project.
After that,we can design the calculator by drifting the swing components ,here we use Jbutton for the number 1 to 9 ,and use textfield to display the result.Like below:
I put the sourcecode in the attachment,you can download it and run it on your computer.
However,this is just a simple application,contains four arithmetic operations(add,subtract,multiply,divide)and arithmetic point operations.Besides,with it ,you can continue your next calculation .Of course, you can do further developing with the existing one.