Figured it out thanks. Please delete.
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Figured it out thanks. Please delete.
Last edited by cc11rocks; February 28th, 2011 at 10:06 PM.
I'm guessing you're losing a variable perhaps.
I'm noticing when I try to get rid of the 0 in the first box it comes back and won't clear.
You set it to default at 1 at think.
Going to try tweaking certain things to see what happens.
You could always keep setting the number to like
Integer.parseInt(secondBox.getText());
No idea why you're doing
public final void actionEvent ....
I don't understand the final part.
Anyway, I'm not sure what this code is supposed to do.
I've noticed that
if (e.getActionCommand().equals("subTract")) { if (setgood == 1) { String nos = stupid.getText(); String yos = yummy.getText(); int heck = Integer.parseInt(nos.trim()); int beck = Integer.parseInt(yos.trim()); heck --; beck --; //heck to nos //beck to yos shook.setText("First Editable Number:" + heck); nook.setText("Second Editable Number:" + beck); setbad ++; setgood++; revalidate(); } else { heck --; beck --; shook.setText("First Editable Number:" + heck); nook.setText("Second Editable Number:" + beck); revalidate(); } }
If setgood is 1, then it adds 1 to setgood.
That means next time it won't be 1 next time.
So it'll go to the else statement and set text text heck and stuff and continue decremnting heck and beck.
I don't know what revalidate() does.
Last edited by javapenguin; February 12th, 2011 at 02:38 PM.