aspose file tools*
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
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: 3071
    
  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.
 
Consider Paul's rocket mass heater.
 
subject: Accessing JRadioButton from another class