Wrox Programmer Forums
Java GUI Discussions specific to programming Java GUI.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java GUI section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 24th, 2004, 01:12 AM
Friend of Wrox
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default Textbox align

I am doing my project in swings and i have taken JPanel
to work with.But I am unable to align properly
Actually i have labels,textfields,textareas and list
I want the alignment to be in order that is from left to right
first Label beside it text box
then 2ndlabel beside it again text box

after this I have to get borders and inside it
I have list box and four buttons it must be in
vertical manner
this way i have two borders and this should on
the bottom

Anyone who can help me in doing this i will be
thankful to them

(Anything is Possible)
(Anything is Possible)
Old August 15th, 2004, 11:40 PM
Registered User
Join Date: Aug 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts

Look, there are numerous tools out there ranging from free to affordable to expensive to make Java GUI painless. Once used you can study the generated code to see how it's done:

Netbeans - A full featured, cross platform, Open Source Java IDE w/ a nice GUI designer including Gridbag Layout. Very mature robust product. Written in Java it requires a fast computer to appreciate (600mhz +, 128MB RAM +, 3D graphics card)

Borland JBuilder (Foundation Edition) - Powerful, fast, full featured Java IDE and GUI Designer.

Elcipse - Full featured Java IDE, but no built in GUI designer. Not as mature as Netbeans or JBuilder, but improving in leaps and bounds. Faster than Netbeans, but slower than JBuilder. GUI designers for eclipse can be purchased from 3rd parties.

Swing designer - $199.00 a Java GUI editor plug-in for Eclipse. Really sweet GUI layout tool capable of rapid development of complex GUIs in Swing or Eclipse's SWT and the code it generates is professionally formatted, readable, and easy to maintain.

Borland JBuilder (Developer Edition) - $499 Top of the line Java IDE, GUI Designer, and Rapid Database Developer.

BX for Java - $998 a complete stand alone visual development tool for pure Java applications. Includes a database designer module that makes Java widgets "data-aware" by mapping them to database fields.

Hope this helps,


Old August 24th, 2004, 07:54 AM
Authorized User
Join Date: Aug 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts

Box container = new Box(BoxLayout.X_AXIS);
container.add(new JLabel("This should do the trick"));

X_AXIS - Components are laid out horizontally from left to right.
Y_AXIS - Components are laid out vertically from top to bottom.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Align to right not working Cyber Shiva HTML Code Clinic 4 July 19th, 2007 01:49 PM
EASY Q: Left-Align and Right-Align DIV? panuvin ASP.NET 1.0 and 1.1 Basics 0 December 16th, 2006 02:02 AM
align=right? larry Javascript How-To 11 July 6th, 2004 05:07 PM
TextBox (Align Center) Problem on Printing mrhyman VB How-To 9 February 19th, 2004 12:14 PM
align Center melvik C# 1 September 7th, 2003 04:50 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.