-
Bug
-
Resolution: Unresolved
-
P3
-
None
-
6u10
-
x86
-
linux_ubuntu
Originally we`ve got the bug report agains NetBeans Installer
http://www.netbeans.org/issues/show_bug.cgi?id=152788
Some of the swing components (like checkbox, button, scrollbar) are partially invisible.
The issue happens on Kubuntu 8.10 with KDE 4.1. Java info:
java version "1.6.0_10"
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) 64-Bit Server VM (build 11.0-b15, mixed mode)
If desktop theme is set to "Clearlooks" for KDE and the "GTK style" configured in KDE is "Qt4" then the issue is reproducible.
After switching to "Clearlooks", "Simple" or "Redmond" for GTK, the controls become fine.
Minimal test case shows that the problems is somewhere in the GTK L&F support in JDK.
Metal: http://www.netbeans.org/nonav/issues/showattachment.cgi/73671/kdetest1.png
Nimbus: http://www.netbeans.org/nonav/issues/showattachment.cgi/73672/kdetest2.png
GTK: http://www.netbeans.org/nonav/issues/showattachment.cgi/73673/kdetest3.png
package kdetest;
import java.awt.BorderLayout;
import java.awt.Container;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
public class Main {
public static void main(String[] args) {
String[] lafs = {"javax.swing.plaf.metal.MetalLookAndFeel",
"com.sun.java.swing.plaf.windows.WindowsLookAndFeel",
"com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel",
"com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
};
for (String laf : lafs) {
try {
UIManager.getInstalledLookAndFeels();
UIManager.setLookAndFeel(laf);
JButton button = new JButton("This is a button");
JCheckBox box = new JCheckBox("This is a checkbox");
JFrame theFrame = new JFrame("ProgressBar");
Container contentPane = theFrame.getContentPane();
contentPane.add(button, BorderLayout.SOUTH);
contentPane.add(box, BorderLayout.NORTH);
theFrame.setSize(300, 120);
theFrame.setLocation(600, 400);
theFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
theFrame.setVisible(true);
try {
Thread.sleep(5000);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
theFrame.setVisible(false);
} catch (ClassNotFoundException ex) {
} catch (InstantiationException ex) {
} catch (IllegalAccessException ex) {
} catch (UnsupportedLookAndFeelException ex) {
}
}
System.exit(0);
}
}
http://www.netbeans.org/issues/show_bug.cgi?id=152788
Some of the swing components (like checkbox, button, scrollbar) are partially invisible.
The issue happens on Kubuntu 8.10 with KDE 4.1. Java info:
java version "1.6.0_10"
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) 64-Bit Server VM (build 11.0-b15, mixed mode)
If desktop theme is set to "Clearlooks" for KDE and the "GTK style" configured in KDE is "Qt4" then the issue is reproducible.
After switching to "Clearlooks", "Simple" or "Redmond" for GTK, the controls become fine.
Minimal test case shows that the problems is somewhere in the GTK L&F support in JDK.
Metal: http://www.netbeans.org/nonav/issues/showattachment.cgi/73671/kdetest1.png
Nimbus: http://www.netbeans.org/nonav/issues/showattachment.cgi/73672/kdetest2.png
GTK: http://www.netbeans.org/nonav/issues/showattachment.cgi/73673/kdetest3.png
package kdetest;
import java.awt.BorderLayout;
import java.awt.Container;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
public class Main {
public static void main(String[] args) {
String[] lafs = {"javax.swing.plaf.metal.MetalLookAndFeel",
"com.sun.java.swing.plaf.windows.WindowsLookAndFeel",
"com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel",
"com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
};
for (String laf : lafs) {
try {
UIManager.getInstalledLookAndFeels();
UIManager.setLookAndFeel(laf);
JButton button = new JButton("This is a button");
JCheckBox box = new JCheckBox("This is a checkbox");
JFrame theFrame = new JFrame("ProgressBar");
Container contentPane = theFrame.getContentPane();
contentPane.add(button, BorderLayout.SOUTH);
contentPane.add(box, BorderLayout.NORTH);
theFrame.setSize(300, 120);
theFrame.setLocation(600, 400);
theFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
theFrame.setVisible(true);
try {
Thread.sleep(5000);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
theFrame.setVisible(false);
} catch (ClassNotFoundException ex) {
} catch (InstantiationException ex) {
} catch (IllegalAccessException ex) {
} catch (UnsupportedLookAndFeelException ex) {
}
}
System.exit(0);
}
}