File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Button in applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Button in applet" Watch "Button in applet" New topic

Button in applet

thanvi janu

Joined: Nov 16, 2009
Posts: 29
difference between getActionCommand() and getLabel(), as it both returns Label of the button
Ankur kothari
Ranch Hand

Joined: Sep 06, 2009
Posts: 531
how is this related to scjp?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10768

getLabel is deprecated and it is recommended you use getText instead

You can set up a button with an action command which is different than the display label. This is useful in scenarios where your UI uses resource bundles where the display language/text can change. the action command is internal to the source code and not visible to the user.

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
I agree. Here's the link:
subject: Button in applet
jQuery in Action, 3rd edition