• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Implimenting GUI.

 
Shhailesh Joshi
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1015
2
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cant getting it.will you do it for me?
 
Campbell Ritchie
Sheriff
Pie
Posts: 50168
79
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks punit,campbell.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic