RSS Forums RSS
Please support our Java advertiser: Lunarpages Java Web Hosting

Small Help Needed, Almost Done

Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,699
Reputation: peter_budo is just really nice peter_budo is just really nice peter_budo is just really nice peter_budo is just really nice 
Rep Power: 12
Solved Threads: 318
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Small Help Needed, Almost Done

  #2  
Apr 24th, 2007
For future please use hash "#" sign in the toolbar to insert code

Originally Posted by volscolts16 View Post
final JTextField totalChange = new JTextField(FIELD_WIDTH);

double totalChange = Cost - payment;

That is your problem, previously declared variable re-declared in defferent part of code

with quick variable update
final JTextField totalChangeJTF = new JTextField(FIELD_WIDTH);
double totalChange = Cost - payment;
...............................................
totalChangeJTF.setText(Double.toString(totalChange) );
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, JAVAWUG (Java Web User Group), Coding the Architecture
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 8:26 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC