learn java
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 The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "radiobutton" Watch "radiobutton" New topic


amrit sharma

Joined: Apr 05, 2010
Posts: 8
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

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

like if i write...
then stmt.

Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2281
8 hours later....

what happened when you tried it?
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 41593
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