Re: Justifying box components
- From: "Michael Dunn" <m_odunn@xxxxxxxxx>
- Date: Wed, 7 Nov 2007 13:46:09 +1100
"H.L" <H.L@xxxxxxxxxxxxx> wrote in message news:47309CF9.4432@xxxxxxxxxxxxxxxx
I want to put a JSlider underneath a label explaining what it is there
for. I have used a Box object instantiated with the createVerticalBox
constructor. The problem is that the text and the slider has a bad
alignment. Is there any way to make them both centered or justified to
either side of the column? Thanks in advance.
if the label is off to the right a bit, add this line
slider.setAlignmentX(0);
but it still might not suit, as the label will appear a bit left of the start of the slider track
if you want them centered, add both lines
slider.setAlignmentX(.5f);
label.setAlignmentX(.5f);
.
- Follow-Ups:
- Re: Justifying box components
- From: RedGrittyBrick
- Re: Justifying box components
- References:
- Justifying box components
- From: H.L
- Justifying box components
- Prev by Date: JDesktop Web Component Crashing
- Next by Date: Re: JDesktop Web Component Crashing
- Previous by thread: Re: Justifying box components
- Next by thread: Re: Justifying box components
- Index(es):
Relevant Pages
|