This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes radiobutton Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "radiobutton" Watch "radiobutton" New topic
Author

radiobutton

amrit sharma
Greenhorn

Joined: Apr 05, 2010
Posts: 8
hii...
i just need to know if i can appy if else condition inside the actionlistener event for the selection of a particular radion button...

for eg:

if(some condtion for radiobutton1)
{
call frame1
}

else if(some condtion for radiobutton2)
call frame2



is this possible??
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
really, what happened when you tried it?
amrit sharma
Greenhorn

Joined: Apr 05, 2010
Posts: 8
hiiii..
no i haven't tried it yet...but is it possible....??


like if i write...
if(radiobutton1.Checked=true)
then stmt.

else
stmt
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2095
    
    7
8 hours later....

what happened when you tried it?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36579
    
  16
amrit sharma wrote: . . . if(radiobutton1.Checked=true) . .


even if you are using the = in its true sense as an equality operator, that is still bad code style.
dushantha Rathnayake
Ranch Hand

Joined: Feb 27, 2010
Posts: 103
If you want to learn java, you must try with your cods.
Remember that first.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: radiobutton
 
Similar Threads
Condional execution of plug-in
performance wise which is better?
The method must return a result type of int?
Which design should I use?
return back in js