• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JRadioButtons in applet

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1.how to hide the border of a JTextarea in an applet.
2.I have added four radio buttons and a Jbutton in an applet.if i select one radio button and press next button the four radio button is comming but the button which was selected remains selected even ihave used the method setSelected(false).
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

Since there seems to be nothing applet-specific in the question, I'll move it to the Swing/SWT forum, where you're more likely to get an answer about this kind of question.
[ August 22, 2008: Message edited by: Ulf Dittmer ]
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by shaikat chakraborty:
1.how to hide the border of a JTextarea in an applet.
2.I have added four radio buttons and a Jbutton in an applet.if i select one radio button and press next button the four radio button is comming but the button which was selected remains selected even ihave used the method setSelected(false).



1) Have you tried JTextArea#setBorder(null) or JTextArea#setBorder(BorderFactory.createEmptyBorder(0,0,0,0)) ? Usually you add a JTextArea to the parent after wrapping it inside a JScrollPane. Check out the API for similar border related methods for the JScrollPane

2) If you have added the buttons to a ButtonGroup and one of them is selected, there is no way you can clear all selections. You need to remove them from the group, clear selections and add them back to the group.
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
2)
for java 1.6+
buttonGroup.clearSelection()
will set them all to false
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And for previous versions of Java you can use a JRadioButton that is not shown in the user interface, and set that as the selected button.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic