wood burning stoves 2.0
The moose likes Swing / AWT / SWT and the fly likes Buttons on Java... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Buttons on Java..." Watch "Buttons on Java..." New topic

Buttons on Java...

Rose Evans
Ranch Hand

Joined: Oct 14, 2004
Posts: 195
You guys..I'm stuck again....My Lays button and my popcorn button do not work when I click on them....it looks like I made them the same way..so what's wrong???

) ) ) )
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
text mis-match
JButton ChipsButton = new JButton("Lays Chips");
else if (e.getActionCommand( ).equals("Lay Chips"))

else if (e.getActionCommand( ).equals("Popcorn"))
Rose Evans
Ranch Hand

Joined: Oct 14, 2004
Posts: 195
Layne,,,thank you, thank you, thank you!! That was a duh on my part!! Ha ha...
Now would you know how to add a text field...in dummy terms for me???
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
Moving to Swing/AWT...

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Consider Paul's rocket mass heater.
subject: Buttons on Java...
It's not a secret anymore!