I added an icon to my label:
label.setIcon(myIcon);
label.setHorizontalTextPosition(SwingConstants.LEFT);
Now I have a text which has right alignment and then I have an icon. But how can I align the icon to the right side and the text to the left?