All replies please to : [EMAIL PROTECTED]

----------------------------------------------------------------------------
--------------------

ok, it's been a long time since I've messaged this board.

I don't know if anyone it around anymore,

but I got a problem.

I have a PanelComponent that I made of a bunch of textfields.

|_____________| |_____| |_______| |___________| |__|

these are all of different sizes...

the problem is that I want a Labeling component to go above it...

so that the labels match up with the fields below them.

so here's what it could look like:

name face feet place #

|_____________| |_____| |_______| |___________| |__|

|_____________| |_____| |_______| |___________| |__|

|_____________| |_____| |_______| |___________| |__|

|_____________| |_____| |_______| |___________| |__|

|_____________| |_____| |_______| |___________| |__|

|_____________| |_____| |_______| |___________| |__|

|_____________| |_____| |_______| |___________| |__|

|_____________| |_____| |_______| |___________| |__|

|_____________| |_____| |_______| |___________| |__|

|_____________| |_____| |_______| |___________| |__|

|_____________| |_____| |_______| |___________| |__|

|_____________| |_____| |_______| |___________| |__|

|_____________| |_____| |_______| |___________| |__|

so I want to be able to do this:

JPanel panel = new JPanel(new BorderLayout());

JPanel scrollPanel = new JPanel(new GridLayout(0,1));

scrollPanel.add(getLabelPanel());

scrollPanel.add(new ManyToOnePortPanel(1, true));

scrollPanel.add(new ManyToOnePortPanel(2, true));

scrollPanel.add(new ManyToOnePortPanel(3, true));

scrollPanel.add(new ManyToOnePortPanel(4, true));

scrollPanel.add(new ManyToOnePortPanel(5, true));

JScrollPane scrollPane = new JScrollPane(scrollPanel);

panel.add(scrollPane, BorderLayout.SOUTH);

panel.add(getButtonPanel(), BorderLayout.SOUTH);

and have the labels from getLanelPanel() line up perfectly with the
ManyToOnePortPanel.

Right now, they are both GridLayouts,

but that leaves TOO much space for the small textfields..

any ideas?

rev aaron


_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing

Reply via email to