Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Swing / AWT / SWT
Search Coderanch
Advance search
Google search
Register / Login
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
Forum:
Swing / AWT / SWT
How to group radio buttons
Vinod Awar
Ranch Hand
Posts: 129
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hii,
i want to create group of radio buttons under heading Encoding the group will have two radio buttons .i have written something like this
class MyPanel extends JPanel { JLabel lbl1=new JLabel("Please enter your email:"); JTextField txt=new JTextField(10); JRadioButton r1=new JRadioButton("DER"); JRadioButton r2=new JRadioButton("PEM"); ButtonGroup grp=new ButtonGroup(); public MyPanel() { setLayout(new FlowLayout()); add(lbl1); add(txt); grp.add(r1); grp.add(r2); add(r1); add(r2); } }
which class should i use to clearly display the group with a heading
Campbell Ritchie
Marshal
Posts: 79151
377
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Does your present suggestion not work? It looks all right to me just on a 5-second glance. How about putting a border round the JLabel?
Qunfeng Wang
Ranch Hand
Posts: 434
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
How about use a
"TitledBorder"
?
[ April 29, 2007: Message edited by: Louis Wang ]
To be or not to be. It's a question.
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Arrays Won't Work
JFrame panels NOT showing. WHY??
observable
why i am not getting the proper format of the following code
JTextArea scroll bar
More...