My blog has moved! Redirecting...

You should be automatically redirected. If not, visit http://mindsiview.wordpress.com/ and update your bookmarks.

Saturday, July 28, 2007

JavaFX Tricks: LookAndFeel

Yes I know, it's been awhile since I've blogged. Over the last few months I've been working on some swing apps, installing ubuntu on a server at my house, and testing open source network monitoring software.

During my time away, I've also been working with JavaFX...I'll blog more on this later. For now I want to leave you with a FX tip that I couldn't find on-line. To change the look and feel of your FX script from the system default to one of the other Java look and feels do the following:

import javafx.ui.*;

Frame {
      lookAndFeel: "javax.swing.plaf.metal.MetalLookAndFeel"
      title: "Metal Look and Feel"
      height: 400
      width: 600
      content: Label {
                text: "Metal Look And Feel"
              }
      visible: true
};
As you can see from the example, the lookAndFeel attribute string needs to be set to the java look and feel class that you want to use.

No comments:

Technorati search