Re: ot but need help does gtk+ work with Java 1.4.2_04?
"David Kafrissen" <[email protected]>
| Newsgroups | gmane.comp.embedded.carlsbad-cubes |
|---|---|
| Message-ID | <[email protected]> |
Okay I did more investigation and it is the JScrollPane and contained components that is not behaving correctly under GTK plaf. Dave "David Kafrissen" <[email protected]> wrote in message news:[email protected]... > Greetings, > > Is there a trick in switching between look and feels? > > I could have sworn this used to work. But when I set the Look and Feel to > the new GTK+ parts of the UI appear white. Is there a trick to setting the > Look and Feel. This happens in Linux and Windows. > > The Java sample, swingDemo located in the JDK does work correctly but I do > not see what they are doing that I am not. > > I can set the Windows XP Look and Feel successfully but the same code does > not work for GTK+. I get part of the UI in white. > > I use these two calls: > try { > > javax.swing.UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.Window > sLookAndFeel"); > javax.swing.SwingUtilities.updateComponentTreeUI(this); > } > catch(Exception e){ > System.out.println("Exception setting look and feel"); > } > > and like this: > try { > > javax.swing.UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAnd > Feel" ); > javax.swing.SwingUtilities.updateComponentTreeUI(this); > } > catch(Exception e){ > System.out.println("Exception setting look and feel"); > } > > Where the root class is a frame so I am calling these two functions on a > frame assuming that the frame is a container and will update all children. > > Thanks in advance and sorry about the Off Topic Post. > > Dave