Hi Support Team, something seems to be wrong in the setForeground method of JLabel. The following minimal example reproduces the error on my maschine. As you can imagine a WHITE text is expected but as screenshot jdk8.png shows it's actually black. After changing to jdk7 the same program behaves like expected (see screenshot jdk7.png).
(Exact jdk versions see at the end of the e-mail)
public static void main(String[] args) throws Exception {
JFrame jframe = new JFrame();
jframe.setLayout(new FlowLayout());
JLabel test = new JLabel();
test.setText("This text should be white");
test.setForeground(Color.WHITE);
jframe.add(test);
jframe.pack();
jframe.setVisible(true);
System.out.println(test.getForeground());
}
java -version
openjdk version "1.8.0_31"
OpenJDK Runtime Environment (build 1.8.0_31-b13) OpenJDK 64-Bit Server
VM (build 25.31-b07, mixed mode)
java -version
java version "1.7.0_75"
OpenJDK Runtime Environment (IcedTea 2.5.4) (Arch Linux build
7.u75_2.5.4-1-x86_64)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)
--
***********************************************
Christian Bürckert, M. Sc.
Junior Engineer at DFKI GmbH
Stuhlsatzenhausweg 3, 66123 Saarbrücken
Raum 1.79
Telefon (SB): +49(0)681 85775 5013
Telefon (WND): +49(0)6851 909 8101
e-mail: [email protected]
web: http://www.innovative-retail.de/
***********************************************
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Strasse 122, D-67663 Kaiserslautern
Geschaeftsfuehrung:
Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter
Olthoff
Vorsitzender des Aufsichtsrats:
Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
smime.p7s
Description: S/MIME cryptographic signature
