posted 20 years ago
The JLabel api has constructors that take an argument int horizontalAlignment and also a method setHorizontalAlignment.
The center section of a BorderLayout will center its child component. GridBagLayout will do the same with default GridBagConstraints.