Re: My own BoxLayout woes
- From: public boolean <jtorres@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 16 Nov 2008 03:55:30 -0500
Harold "Curly" Phillips wrote:
"public boolean" <jtorres@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:gfe13o$il6$1@xxxxxxxxxxxIn the below code, I have an instruction label and below it an input area with a label and a JTextField. I want whichever is smaller to be centered above or below the other.
The problem is that the Box.createHorizontalGlue() method call no longer appears to work.
You've made an incorrect assumption.
Excuse me?
How rude!
I have, of course, done nothing of the sort.
I also tried adding them to the workPanel at EAST and WEST without results.
You have failed
Excuse me?
How rude!
I have, of course, done nothing of the sort.
Why won't the smaller item center itself? What has changed since previously?
It does center itself.
It doesn't.
label.setBorder(new LineBorder(Color.BLUE)); // HP
Don't want a border.
label.setMaximumSize(label.getPreferredSize()); // HP
Shouldn't matter. I haven't needed this in similar situations previously. Though it's not behaving as in similar situations previously...
fieldPanel.add(mtFieldWP);
fieldPanel.add(Box.createHorizontalGlue()); // Has no effect.
extLabelWP.setDisplayedMnemonic(KeyEvent.VK_E);
extLabelWP.setLabelFor(mtFieldWP);
By adding two dozen lines Paul could have made this into an SSCCE.
Who is Paul?
.
- Follow-Ups:
- Re: My own BoxLayout woes
- From: John W Kennedy
- Re: My own BoxLayout woes
- References:
- My own BoxLayout woes
- From: public boolean
- Re: My own BoxLayout woes
- From: Harold \"Curly\" Phillips
- My own BoxLayout woes
- Prev by Date: Re: the Java Lang will support Properties in Futuere?
- Next by Date: Re: Maximum identity hashcode?
- Previous by thread: Re: My own BoxLayout woes
- Next by thread: Re: My own BoxLayout woes
- Index(es):
Relevant Pages
|