File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Rookie Programming Question

 
Hunter Rose
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Requirements: Write a Java Program using a GUI that calculates and displays the mortgage amount from user input of the amount of mortgage, the term of the mortgage, and the interest rate. Allow the user to loop back and enter new data or quit.
Problem: I am pretty sure I have everything covered except how to get the program to calculate. Is there anyone out there who can check over my code and tell me what mistake I am making?
I am a rookie Java programmer and a rookie to this type of forum. I am seeking help so if I am asking in the wrong place, please point me to the appropriate area for this type of question.
My code follows:
[ edited to remove the evil tab character, and to preserve formatting using the [code] and [/code] UBB tags -ds ]
[ March 16, 2004: Message edited by: Dirk Schreckmann ]
[ March 16, 2004: Message edited by: Dirk Schreckmann ]
 
Mani Ram
Ranch Hand
Posts: 1140
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem lies here

You are trying to get the value from the labels (JLabel), instead of the text fields (JTextField)
Try changing it to
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic