473,472 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to align the items in a form (grid layout)?

I need to place JLabels and JTextFields in a panel and align them as a form:

Name: <text field>
Surname: <text field>
Address: <textfield>

etc.

I'm trying to use GridLayout.


panel1.setLayout(new GridLayout(1,2));


It works, but the spaces between labels and text fields are very big. How to make them smaller?
Or maybe I should us a different layout for that?

Please help
Nov 26 '10 #1
0 974

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: T. Bjarne | last post by:
I'm writing a form with a grid layout (similar to the ones in phpMyAdmin). The form will contain X number of columns and Y rows - all cells containg INPUT elements. As long as the data isn't...
5
by: Rick Spiewak | last post by:
I'm using a DataList inside a Grid Layout Panel (which ends up being a <DIV>) so that I can use the overflow:scroll property. This is working fine, except for one anomaly: If there aren't enough...
4
by: NWx | last post by:
Hi, I develop an ASP.NET app which should be used from Internet, so I don't have control over what browsers will be used. I don't want to target every possible users, so I don't really mind is...
6
by: Don Collins | last post by:
Can anyone point me to a white paper discussing the advantages / disadvantages to using “grid layout” vs. “flow layout” on webforms? I’m looking to address performance issues in particular.
2
by: Jerry Camel | last post by:
I'm using Grid Layout basically because it was the default, but I've got the whole page designed and changing to Flow layout would be a royal pain, I think... But now, I find I need to position a...
3
by: John | last post by:
Hi What is the easiest/recommended way to have a form with fields on a grid layout? I have found it very difficult to achieve. Any help as well as tutorial/example links would be appreciated. ...
1
by: jef | last post by:
I have an HTML Grid Layout Panel on my web form that I would like to hide/show via certain events in my VB code behind. However, I'm not sure how to reference the panel. I've set the ID property...
1
by: Tina | last post by:
In order to constrain the screen real-estate a datagrid takes, I use an HTML Grid Layout Control with scrollbars. One problem, however is that the datagrid changes horizontal size depending on...
3
by: Dave | last post by:
I am designing a web page using VS2003 ASP.NET. The page contains various DIVs (panels), one of which is in grid layout. The controls in this DIV render correctly in IE, but when using Firefox they...
5
by: Rob R. Ainscough | last post by:
In ASP.NET 1.1 I had grid layout option, in ASP.NET 2.0 it seems flow control is my only option?? Is this correct? If so, how do I position the controls where I what them to appear? Thanks,...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.