Boxlayout - align things to the right?
I have a Box setup with PAGE_AXIS layout.. The Box will contain several JLabel icons (no text) and will be wider than the icons combines. I want the extra space to appear on the left side instead of the right. How do I add this?
I've tried adding Box.createHorizontaGlue() as the first thing but that doesnt help.
FYI, this container will implement TableCellRenderer
So like this:
[ .........................[ ] [ ][ ][ ][ ][ ][ ]|
AdvertisementAs already mentioned in a boxLayout you have to set the alignment of each child to get the overall alignment. While that's acceptable in a small container, it can get boring in a bigger environment. So in the long run you might consider switching to more powerful LayoutManager like JGoodies FormLayout (http://forms.dev.java.net/): it lets you define component alignment on a per-column/row basis.
Personally I switched completely to FormLayout (from nested BoxLayouts which are not too bad, IMO) and developed a visual builder for it (http://swingempire.de/palace/FormBuilder) <g>
- 1Material backflush in production order after finished goods GR 10-11
- 2Safari Update Sending my MBP into Spasms?! 10-11
- 3How to calculate the phase difference from 2 input sine waveform? 11-30
- 4Word processing using cental european language 11-30
- 5Core Audio & Drivers 11-30
- 6PropertyChangeListener for a JButton that contains a JPanel? 11-30
- 7After Effects CS4.0 11-30
- 8When i open an app it opens but closes soon after can someone help me 11-30
- I have all the files from my itunes on an old computer and want to move them to a new one10/11
- Delete button in CFGRID10/11
- I didn't want iOS 6.1!10/11
- Help with Spry Menu Bar 2.0 (vers. 1.0) - Placement of customized styles files10/11
- Yahoo DSL from Dell Desktop to ibook-wirless via Airport Extreme11/30
- Notes on I-pod, I-phone and I-pad disappeared. Any way to get them back?11/30
- OM inotype does not exist in PO1311/30
- Win8RP: Failed to create new process "...javaw.exe" - Invalid argument11/30
- How to stop illustrator from crashing?11/30
- Availability Check - Committed Date Field11/30