• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using GTK+ Look and Feel

 
David Kafrissen
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings,
Can anyone help? This is really fustrating!
I can dynamically change the Look and Feel between regular and Windows. But I really want GTK+ because my app is going to be deplyed under Linux.
However, when I change the Look and Feel to GTK+ either all or parts of the UI turn white.
I am using Java 1.4.2_04
For example, if the main class is a java frame then I use this code:
try {
javax.swing.UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel" );
javax.swing.SwingUtilities.updateComponentTreeUI(this);
}
catch(Exception e){
System.out.println("Exception setting look and feel");
}
This happens under Windows and Linux.
Thanks in advance,
David Kafrissen
 
David Kafrissen
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did some research and realized that the problem is specifically with JScrollpane and GTK. I am using the scrollpane to store various GUI elements and not just text so to become white is not the correct behavior. In the windows look and feel and the default look and feel it works. But when I switch the GTK all colors wash away to white within the JScrollpane
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!