Re: My own BoxLayout woes



Harold "Curly" Phillips wrote:
"public boolean" <jtorres@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:gfe13o$il6$1@xxxxxxxxxxx
In 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?
.



Relevant Pages

  • Re: Whassup? was [psnip]
    ... that seems to describe your posts mor than any I've seen Loz post. ... I can't see anything rude about it at all. ... I'm not sure what sort of intention could be ... I don't see how making ill-informed remarks designed to annoy can be ...
    (uk.people.support.depression)
  • Re: Im concerned about the size of my penis
    ... Well, sorry if that seems rude and in poor taste (it is, ... to think this sort of thing is shocking...and somehow amusing...(see ... Junior needs to grow up. ...
    (sci.med.diseases.lyme)
  • Re: D Star- anyone using it?
    ... Able to (sort of) programme in languages no one uses ... Is it possble to make rude comments about imaginary people? ...
    (uk.radio.amateur)
  • Re: OT: sewerage
    ... incompetent and rude. ... or cracker - not to be confused with English "cracker" which is a sort of party-favor. ... It's a paper tube wrapped in colored crepe-paper, containing some sort of prize and enough of a charge so when you pull the string that opens it, it "cracks".) ...
    (rec.pets.cats.anecdotes)
  • Re: Unipod or Blitz?
    ... Rob Kendrick wrote: ... forceful because this sort of thing is far worse. ... You can't resist being rude and trying to start an argument on every ...
    (comp.sys.acorn.hardware)