Solved

User Entry

Posted on 2008-06-13
2
271 Views
Last Modified: 2013-12-14
I have written a small Java application with a GUI that calculates mortgages.  One version allows the user to calculate the mortgage payment by entering the loan amount, interest rate and term.  It also allows the user to select interest rate and term choices, by clicking a button for that option and then enter the loan amount.   Here is the problem, if you enter the loan amount and then select the loan option button, it clears the amount you entered.  I have no idea what's causing it or where to look.

I am hoping that you can point me in the right direction without viewing the code.  
0
Comment
Question by:Athanman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 13

Accepted Solution

by:
Bart Cremers earned 500 total points
ID: 21784204
The Swing API does not clear a text field by itself, so somewhere in your code there should be a JTextField.setText("") to clear it.

Of course, without viewing the code it's hard to pinpoint the exact location, but searching for setText is where I would start.
0
 
LVL 1

Author Comment

by:Athanman
ID: 21785435
You got it, my if statements for those button clicks had:
loanamountfield.setText("");
once I took that out, it's good to go.  
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Maven Project: Hibernate Dependencies Conflict 10 49
tomcat startup error 5 135
running on tomcat not jboss eap 7.0 3 30
java mysql insert application 14 44
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question