Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to create a compounded radio button?  RSS feed

 
Karl Fu
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one give me some insight in creating a JDialog box with compounded radio button?
ie.
I want to have 3 radio choices on my dialog box and the 3rd choice is attached to a jTextField. Only when the 3rd choice is selected, user is allowed to inputed in the JTextfield.
eg.
o A: apple
o B: banana
o c: Other Fruits [jTextField here]
Thanks in advance,
Karl
 
Devangi Patel
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok karl your prob is very simple
just keep the textfield disabled by method
TextField_object.setEnable(false) and when u select the last radio button ie other fruits u make it enabled thru
TextField_object.setEnable(true)
ok hope this will solve ur prob
and let me know if u get Thru
bye
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!