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
Tested on MacOS 12.6 Java 20.2 or Java 1.8.0, flatlaf-3.2.2.jar
Expected Behavior: Non-HTML selected buttons can have their text colored via setForeground(color).
Errant Result: Non-HTML selected buttons ignore setForeground(color). HTML works fine, and unselected buttons work fine. JButtons without flatlaf can be colored fine.
import javax.swing.*;
import java.awt.*;
import com.formdev.flatlaf.*;
public class Example
{
public static void main(String[] args)
{
FlatLightLaf.setup(); // Comment out to see difference
JFrame frame = new JFrame();
Box box = new Box(BoxLayout.Y_AXIS);
JButton button = new JButton("Selected Normal");
button.setSelected(true);
box.add(button);
button = new JButton("Selected Blue");
button.setForeground(Color.BLUE);
button.setSelected(true);
box.add(button);
button = new JButton("<html><font color=blue>Selected Blue HTML</font></html>");
button.setSelected(true);
box.add(button);
button = new JButton("Unselected Normal");
box.add(button);
button = new JButton("Unselected Blue");
button.setForeground(Color.BLUE);
box.add(button);
button = new JButton("<html><font color=blue>Unselected Blue HTML</font></html>");
box.add(button);
frame.add(box);
frame.setVisible(true);
}
}
The text was updated successfully, but these errors were encountered:
Tested on MacOS 12.6 Java 20.2 or Java 1.8.0, flatlaf-3.2.2.jar
Expected Behavior: Non-HTML selected buttons can have their text colored via setForeground(color).
Errant Result: Non-HTML selected buttons ignore setForeground(color). HTML works fine, and unselected buttons work fine. JButtons without flatlaf can be colored fine.
The text was updated successfully, but these errors were encountered: