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>
- 1Convert WMV files to MPEG and/or get Quicktime plug-in for WMV and AVI 10-11
- 2NFS connections to AS/400 fail 10-11
- 3HT1657 cancel movie rental 11-30
- 40document_browser temp error 11-30
- 5Where, oh where did my photos go? 11-30
- 6Classic Producer/Consumer question 11-30
- 7How can scratches be removed in mac air, how can scratches be removed in mac air 11-30
- 8Trying to create two toolbar buttons. Need codes. 11-30
- Oracle client and networking components were not found.11/30
- Concept between FI-CA, FI-AR, and FI-AP11/30
- Sending Purchase Order by Email as an PDF Attachment.11/30
- Questions about use of InfoObjects11/30
- Third party remittance simulation document11/30
- Cisco Call manager down11/30
- Canon EOS 5d Mark III11/30
- Kernel options for drivers11/30
- Microsoft Office Word previewer11/30
- Why don't Adobe have a contact for customer services - the "chat' person ignored this question an impressive 5 times .11/30