"Chris" <chris@supernetpower.com> wrote in message
news:63f995ad.0305280836.11475e03@posting.google.com...
> Hello...
>
> I've looked, and I've experimented, and I can't figure out how to do
> what I want to do.
>
> I have a JComponent, a JTextField to be specific, within a JPanel.
> The JTextField centers itself, but I want to specifically set it's
> orientation to the left of the JPanel.
>
> Help!!!!
Check your LayoutManager !
A JPanel uses FlowLayout by default, and places all components in a row -
centering the entire row. Set the LayoutManager if you want a different
layout, i.e:
JPanel p = new JPanel(new BorderLayout());
JTextField field = new JTextField();
p.add(field, BorderLayout.WEST);
places the textfield in left side of the JPanel.
see
http://java.sun.com/docs/books/tutorial/uiswing/components/panel.html
for more information.
mvh
Peter Lind