Solved

User Entry

Posted on 2008-06-13
2
268 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
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.

863 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now