File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Buttons on Java... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
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 looks like I made them the same 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 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
I agree. Here's the link:
subject: Buttons on Java...
It's not a secret anymore!