Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

JButton: Text is painted below icon #128

Open
QStormDS opened this issue Feb 16, 2014 · 1 comment
Open

JButton: Text is painted below icon #128

QStormDS opened this issue Feb 16, 2014 · 1 comment

Comments

@QStormDS
Copy link

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);

@QStormDS
Copy link
Author

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 free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant