Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

Client-side Java's evolutionary leap

Looking back on a year of changes

  • Print
  • Feedback

Page 2 of 6

One noteworthy session introduced JWebPane, a new HTML component for Java. JWebPane provides a much-needed replacement for Swing's JEditorPane component, which renders only HTML 3.2. JWebPane is based on, and interacts with, the open source WebKit Web browser engine, which supports HTML 4, Cascading Style Sheets (CSS), JavaScript, and the Document Object Model (DOM). It takes care of Java tasks such as calculating component bounds, rendering, networking, and dispatching events, and its main JWebPane class subclasses javax.swing.JComponent. JWebPane project tech lead Alexey Ushakov announced in December that JWebPane's code should be available in a few months, preceded by an API overview. Because it's important to thoroughly vet a new API (to implement missing features or remove clutter) before integrating it into a JDK, and because the code is still under development, it seems unlikely that this highly anticipated component will make it into JDK 7.

Another session focused on Mikael Grev's popular MiGLayout layout manager. I touched base with Grev about plans for MiGLayout:

Q: Could you briefly describe this layout manager and explain why it's so useful?

Mikael Grev: MiGLayout positions components on screen using a powerful, but intuitive, domain-specific language (DSL). The popularity of MiGLayout, I believe, is that it is 100 percent optimized for the user. It has lots of built-in logic and platform rules so that the user only needs to give hints how the components are related, and MiGLayout does the rest. The Swing layout managers in the JDK use the opposite approach; they are architecturally very simple, and it is up to the user to make the decisions about gaps, positioning, and such. MiGLayout encapsulates all the functionality of almost all Swing layout managers. It also has all those nifty little extras such as resolution independence, visual debugging mode, and automatic gap and button order per platform handling.

Q: I understand that you are trying to get MiGLayout included as part of the JDK 7 core. How likely is this to happen?

Mikael Grev: I have no idea how likely it is, unfortunately. The RFE [request for enhancement] -- which is the officially most wanted one for Swing, by the way -- hasn't after one and a half years gotten an official evaluation. I think the reasons are more corporate policy than technical; they might be reluctant to overtake the official responsibility for a relatively complex software since they didn't write it in-house. But then again, that is what open source is all about. Some have voiced a concern that inclusion in the JDK would slow the development process of MiGLayout in the future. Since we are at zero known bugs and zero things to do, I don't understand how that would apply.

Q: Do you have plans for a JavaFX version of MiGLayout?

Mikael Grev: MiGLayout was made from the start to be very easy to port, and it exists officially for Swing and SWT today. It only touches the GUI framework classes through three proxy interfaces, and these are the only ones to implement to port it to a new GUI framework. So there will be a JavaFX version because it should be easy to do, and there are developers wanting it, especially because there are no real layout managers there now as I understand it. Amy Fowler (from the JavaFX team), Dean Iverson, and I are currently outlining the details on how to do this the best way.

A final highlight of JavaOne 2008 (for this developer) was the Effective Java Reloaded session, in which former Sun employee Joshua Bloch launched Effective Java, Second Edition. This successor to the popular first edition, released in 2001, offers even more insights into writing quality Java client (and server) code.

  • Print
  • Feedback

Resources

Also from JavaWorld