ixmal's blog
JavaFX 2.0: how to size your windows easily
Window size vs Scene size
Using JavaFX 2.0 inside Swing applications
JavaFX 2.0 Beta is out on May 26, 2011. There are many blogs posted about it already, http://fxexperience.com/ is the primary one, and I don't want to post yet another overview of what features are available. Instead, I would like to take a deeper tour into one particular component called JFXPanel
What is JFXPanel?
Building JDK bits
Recently, I got a new desktop, and the first thing I started with was building JDK. Approximately at the same time I got an image of a new operating system by Microsoft (beta version) and started testing it. So, the natural idea was to combine these efforts. Unluckily, I decided to install the 64-bit version of the system to get the most of 4Gb RAM.
Using JWebPane: common scenarios
In the last blog posting I introduced a new component called JWebPane that renders HTML content in Java applications. Today I'd like to discuss the details of the practical use of this component. Let me start with typical use cases.
Introducing JWebPane component
Recently, at the JavaOne conference, Sun has introduced several new JavaFX related technologies and products. The Scene Graph and WebKit session was one of the technical sessions to present such advanced technologies:
java.awt.TrayIcon: isSupported vs isAvailable
Description of the problem
When the java.awt.SystemTray class was first introduced in JDK 6.0, there was only one method to check if the system tray and tray icons can be used: isSupported(). The value returned by this method is constant for the given desktop/environment, for example, on Windows platform it always return true.
Improved top-level icons support in Mustang
What's the problem?
In Java™ 2 SE 5.0 and previous releases a single method in java.awt.Frame class enables developers to specify an icon for the frame: setIconImage(Image image). This image had an arbitrary size and it was scaled to represent frame's icon in a different locations.
java.awt.Desktop vs Runtime.exec()
Desktop API vs Runtime.exec()
I'm often asked why is that new class, java.awt.Desktop, is introduced. They state all the required actions can be performed with the call to one of Runtime.exec() methods:
Desktop.getDesktop().open(new File(filename));is close to
Using JPopupMenu in TrayIcon
What's the problem?
Tray icons introduced in Mustang have several properties and methods corresponding to image for the icon, tooltip text, popup menu and ability to show some message to the user. Let's inspect the popup menu more closely.
Headless toolkit basics
Toolkit
java.awt.Toolkit is an abstract superclass of all actual implementations of the Abstract Window Toolkit (AWT). Subclasses of java.awt.Toolkit are used to bind various components to particular native resources.




