Originally posted by Dalia Sultana:
I have a jlabel as a rendering component for a JTable, it shows some text and an icon. I want the text to appear on the right side and the icon on the left. If I call setHorizontalAlignment on the label, everything goes to the right. Any ideas?
setHorizontalAlignment sets the alignment of the label contents (text and icon if any)
setHorizontalTextPosition sets the position of the text with relation to the icon.