Solved

User Entry

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
simple java question 3 56
Online file editor, manager 6 75
How can I build my own IDE using ASP.NET MVC? 2 44
Arrays.asList  VS  ArrayList 4 59
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to implement Singleton Design Pattern in Java.

773 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