Solved

User Entry

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

688 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