Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

radiobutton

 
amrit sharma
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
really, what happened when you tried it?
 
amrit sharma
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2613
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
8 hours later....

what happened when you tried it?
 
Campbell Ritchie
Sheriff
Pie
Posts: 49789
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to learn java, you must try with your cods.
Remember that first.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic