File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JRadioButtons in applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JRadioButtons in applet" Watch "JRadioButtons in applet" New topic
Author

JRadioButtons in applet

shaikat chakraborty
Greenhorn

Joined: Aug 22, 2008
Posts: 5
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).
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
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 ]

Ping & DNS - updated with new look and Ping home screen widget
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9990
    
    7

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.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
2)
for java 1.6+
buttonGroup.clearSelection()
will set them all to false
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19543
    
  16

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JRadioButtons in applet
 
Similar Threads
JRadioButton
java script
Question on using DisplayTag in JSPs
Show Document in Applet
how to invoke method based on radio button select