This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund 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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply 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
Bartender

Joined: Sep 08, 2007
Posts: 2927
    
  15

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
JTabbedpane with JRadiobutton?
problem with reverse tabbing
Linking RadioButton to class
why am i getting a null pointer exception