Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #2731

Re: Justifying box compon

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!transit3.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail
From "Michael Dunn" <michael.dunn@THRWHITE.remove-dii-this>
Subject Re: Justifying box compon
Message-ID <4731272a@dnews.tpgi.com.au> (permalink)
X-Comment-To comp.lang.java.gui
Newsgroups comp.lang.java.gui
In-Reply-To <47309CF9.4432@operamail.com>
References <47309CF9.4432@operamail.com>
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92]
Lines 21
Date Wed, 27 Apr 2011 15:40:50 GMT
NNTP-Posting-Host 96.60.20.240
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1303918850 96.60.20.240 (Wed, 27 Apr 2011 10:40:50 CDT)
NNTP-Posting-Date Wed, 27 Apr 2011 10:40:50 CDT
Organization TDS.net
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.gui:2731

Show key headers only | View raw


  To: comp.lang.java.gui
"H.L" <H.L@operamail.com> wrote in message news:47309CF9.4432@operamail.com...
>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);

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Justifying box components "H.L" <h.l@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
  Re: Justifying box compon "Knute Johnson" <knute.johnson@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
  Re: Justifying box compon "Michael Dunn" <michael.dunn@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
    Re: Justifying box compon "RedGrittyBrick" <redgrittybrick@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000

csiph-web