Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #2731
| From | "Michael Dunn" <michael.dunn@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Justifying box compon |
| Message-ID | <4731272a@dnews.tpgi.com.au> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <47309CF9.4432@operamail.com> |
| Date | 2011-04-27 15:40 +0000 |
| Organization | TDS.net |
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 | Next — Previous in thread | Next in thread | Find similar | Unroll 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