I've got GridLayout-JPanel. In every cell there is a JLabel with some String. How can I right-align this text in my cells?
@Noran In response to your comment on @mre's answer, you could initialize all the JLabels into an array. Then, all you'd have to do is loop through the array and set the alignment that way.
for (JLabel label: arrayOfJLabels) {
label.setHorizontalAlignment(SwingConstants.LEFT);
}