Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-06-2008, 02:43 AM
AJG AJG is offline
Member
 
Join Date: Apr 2008
Posts: 7
AJG is on a distinguished road
Multiple Layout Managers
hi, i'm trying to create a user interface using layout managers except i don't know which one to use, as i think that i need to use different layout manager for different parts

i am aiming to have the title at the top of the applet and the JTextArea directly underneath this with 4 radio buttons underneath

my first thought was to use the BoxLayout Manager however my radio buttons go underneath each other instead of in a line.

This is the current code that i have so far:

Code:
class Page2 extends JFrame { public Page2() { super ("Multiple Choice Questions"); setSize (600,600); Container p = getContentPane(); p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); JLabel title = new JLabel("TEST QUESTIONS"); p.add(title); JTextArea area = new JTextArea(1,1); area.setEditable(false); p.add(area); JRadioButton A = new JRadioButton("A"); p.add(A); JRadioButton B = new JRadioButton("B"); p.add(B); JRadioButton C = new JRadioButton("C"); p.add(C); JRadioButton D = new JRadioButton("D"); p.add(D); } }
If you can help thanks in advance, any advice is welcome
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SWT Layout JavaForums Java Blogs 0 12-31-2007 05:53 PM
Help with JButton and layout adlb1300 AWT / Swing 1 12-25-2007 09:33 AM
Layout Managers gmioannou AWT / Swing 1 12-24-2007 05:12 AM
Help with Grid Layout coco AWT / Swing 1 08-06-2007 09:03 PM
JGraph Layout Pro 1.4.0.3 levent Java Announcements 0 07-31-2007 07:43 PM


All times are GMT +3. The time now is 11:24 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org