This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Accessing JRadioButton from another class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Accessing JRadioButton from another class" Watch "Accessing JRadioButton from another class" New topic
Author

Accessing JRadioButton from another class

Lyn Arce
Greenhorn

Joined: Nov 02, 2010
Posts: 5
Hi all,
I´m doing an applet with a clock and two radio buttons to select the background color.
I´m not sure how to access the radio buttons in the applet class, I´m trying it with an ActionListener, and setActionCommand,
but I can´t make it work...

Thanks in advance,
Lyn



\\Here is the (problematic) Coloring class
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3064
    
  33

You can use-


and then in the actionPerformed-


Mohamed Sanaulla | My Blog
Lyn Arce
Greenhorn

Joined: Nov 02, 2010
Posts: 5
Thanks, I got it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Accessing JRadioButton from another class
 
Similar Threads
problems w/ JCheckBox's and TableModel
Linking RadioButton to class
why am i getting a null pointer exception
problem with reverse tabbing
JTabbedpane with JRadiobutton?