You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
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);
The text was updated successfully, but these errors were encountered:
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.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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);
The text was updated successfully, but these errors were encountered: