wood burning stoves 2.0*
The moose likes Java in General and the fly likes RadioButtons and if statements and more.... 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 » Java in General
Bookmark "RadioButtons and if statements and more.... " Watch "RadioButtons and if statements and more.... " New topic
Author

RadioButtons and if statements and more....

Justin Kuyken
Greenhorn

Joined: Aug 26, 2004
Posts: 4
Hi,
I am creating a program for school and was wondering if someone could help me in figuring out how i could add a section to my program where if the user selects a specific radio button in the group that a JList and a Jbutton appear in the container with everything else and if that radio button is no longer selected the list and button disapear again.
I've tried playing around with ItemListeners and flags but to no luck...
If possibly please explain in simple terms as i am not really up with the technical phrases thanks,
Any help would be greatly appreceated.
[ September 07, 2004: Message edited by: Justin Kuyken ]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
I think an ActionListener on the radio button should work.


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
Max Rahder
Ranch Hand

Joined: Nov 06, 2000
Posts: 177
Read the Swing Tutorial. It's great. http://java.sun.com/docs/books/tutorial/uiswing/

Here's a crude example:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RadioButtons and if statements and more....
 
Similar Threads
JRadio
struts and ajax
Please help with Radio Button in Struts 2
How values of a radio button selected can be retained
Problem in Struts radio button