File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Implimenting GUI. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Implimenting GUI." Watch "Implimenting GUI." New topic
Author

Implimenting GUI.

Shhailesh Joshi
Greenhorn

Joined: May 04, 2012
Posts: 26
Hey This is my simple code for calculating interest.i also created GUI code using GuiDFrame software.Now problem is that how to implement the code in GUI code.
This is the base code.

And this is the GUI code generated by GuidFrame software.
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 979
    
    2
Instead of system.out.println(), use JLabels.


Instead of inputstream use textboxes.


Take all the textfield values into variables.
This should be done in a function:


add a button



i also created GUI code using GuiDFrame software

gui builders are not really helpful if you are a beginner.
Shhailesh Joshi
Greenhorn

Joined: May 04, 2012
Posts: 26
cant getting it.will you do it for me?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37874
    
  22
Shhailesh Joshi wrote:cant getting it.will you do it for me?
No.

That calculating interest method looks untidy. Why are you using floatss in the first place, and why have you got so many local variables. You cannot get that to work with the GUI because it is not an interest-calculating class. It is a procedure. You need to get rid of that procedure and create a class which can calculate interest. You might call it Loan. Get it working from the command line and only consider the GUI after you have got that working correctly.
Shhailesh Joshi
Greenhorn

Joined: May 04, 2012
Posts: 26
thanks punit,campbell.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Implimenting GUI.
 
Similar Threads
Scroll panel problems
Can't Update Record ?
Event problems
Can't Update Record ?
First GUI program