Skip to main content

Alignment problem

1 reply [Last post]
Joined: 2009-12-06

Hi all,

I am using BorderLayout with an icon on the West and a TextField on the Center of the container. The problem is if the TextField spans to more than one line, the icon is aligned vertically at the center of the Container. What I need to do is to keep the icon vertically on top even if the TextField occupies more than one line.

I suspect this is a simple problem but I can't seem to find the answer myself. Would appreciate ideas on how to solve this issue.

Many thanks!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2010-01-15

create a new container with box layout on the y-axis then add your text field to it, then add this container to the form on the west.