I have a form that contains a bunch of JLabels and JTextfieds that will allow someone to edit a record. It will look something like so:
I am using BoxLayout to accomplish this JLabel right-justification. For the above example, I would create two horizontal boxes that are contained by one vertical box. I am using hBox.add(Box.createHorizontalStrut(int)) to move any shorter JLabels to the right so that they align properly.
I'm not sure if my method is font dependent. I'm afraid that on another machine, the JLabels would not be aligned if the system is using a different font. Is my method okay or is there a problem? Any suggestions? Thanks a lot in advance [ June 04, 2004: Message edited by: Anthony Watson ]