First of all, using gnome is not an option (but it is possible to install its libraries).
I need to know what is needed to display the Java Swing desktop using the current KDE installed KDE look. Ideally, the solution should allow me to apply an appearance that looks like a basic window system (e.g. Windows LNF for Windows, GTK LNF for Gnome (GTK), QT LNF for KDE (QT), by default for other platforms).
In KDE, you can configure it to use the current KDE theme for GTK applications. So, if the solution works with GTK, that's fine.
When I run the following code snippet under Gnome (Ubuntu 8.04), the Java application looks beautiful. It integrates very well with other applications:
try { // Set System L&F UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) { //Handle it }
However, if I run the same in Debian (Lenny) with KDE, calling UIManager.getSystemLookAndFeelClassName () returns the default Java value. If I continue and force him to use GTK LNF, the application does not work. Some fields are invisible, others become inappropriate, everything is unusable:
try {
I also tried putting the following code. This allowed the user to select any of the available LNFs, and then try to install it. Metal and motif work great. GTK does not. The slider is really messed up. The list box looks ugly and disappears, but it seems to work. The buttons and menus look fine. The corresponding code is shown here:
(...) public SwingFrame() { initComponents();
In the same system, all GTK applications work (for example, Firefox), as expected. So:
1) What is missing in the environment for the Java GTK LNF application to work in KDE?
2) What does the JVM check for returning GTK as the system default theme?
Thank you for helping Luis Fernando
PS-> I also tried other solutions like JGoodies, simple AWT and SWT. However, Swing with GTK LNF will be the best solution to avoid problems with native SWT libraries and additional JGoodies banks (also JGoodies LNF does not look as integrated as Swing GTK under Gnome). AWT looks disgusting (similar to a motive) and misses a lot of features.