Open QStormDS opened 10 years ago
I found the root cause: The text is painted before the icon in "org.pushingpixels.substance.internal.ui.SubstanceButtonUI" (line 338-347). The order is different to "javax.swing.plaf.basic.BasicButtonUI" where the text is painted after the icon.
The text of a JButton is painted below the icon if Insubstantial LAF is set. However, the text is painted above the icon if Metal LAF is set for instance.
Example code: JButton button = new JButton(text,icon); button.setVerticalTextPosition(SwingConstants.CENTER); button.setHorizontalTextPosition(SwingConstants.CENTER);