Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-03-2009, 09:44 AM
Member
 
Join Date: Mar 2009
Posts: 1
Rep Power: 0
Javalover14 is on a distinguished road
Wink JavaLover Terrified
Assalaam O Alaykym(Peace) to Brothers and Hi to rest!

My name is ...i would like to make many Java friends of all ages.....................to know me you can add me - my email
shoaibenatorme@gmail.com
shoaib_braveheart@hotmail.com

Just started learning Java. Im making an Applet of a calculator. I have to make functions like normal arithmetic, factorial and generating random numbers and Log function. I have to use NetBeans IDE 6, that is what is being taught in University.

I dont have much time, busy in FYP, otherwise, i would learn from Notepad.

Can anyone give me some reference of sample code to Calculator JavaApplet?
Well appreciated!
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 03-03-2009, 06:16 PM
Steve11235's Avatar
Senior Member
 
Join Date: Dec 2008
Posts: 972
Rep Power: 2
Steve11235 is on a distinguished road
Default
No, but I can give you a couple of suggestion.

First, use the Matisse form designer to create your user interface. That will save you a ton of time. Look at the code it generates to understand what it is doing.

Instead of starting with JApplet, start with JFrame. You can turn it into an applet later, and you can run JFrame on your PC without the browser headaches.

Add a JPanel to the JFrame, and put your components in there. Then, you can just move the JPanel to a JApplet. In fact, you can make the JPanel an external class and use it as a component in both (when you get more experienced).

Don't add any logic to the GUI. Create a controller to run the application and a model to handle all your calculations. The controller should create the GUI and the model and pass values back and forth between them. Have the controller listen to events generated by the GUI.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +2. The time now is 10:07 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org