Update: Desktop Java Features in Java SE 6

The desktop Java client group at Sun is working on some great features and functionality in the next release of the Java Platform, Standard Edition (Java SE, formerly known as J2SE). We thought it might be useful to detail some of the highlights here. Where possible, we will add pointers to additional information (such as bug IDs or other articles). We will also give information on the JDK 6 build into which each item is integrated as development proceeds. And with the Java SE 6 release, this is more than just talk: You can download the latest bits anytime you want.

Note that we are attempting to be as open and honest as possible here. We are telling you the things that we would like to do in Java SE 6. It is entirely possible that some of these items may not make it into the release for one reason or another. Version 6 is, after all, very much mid-development right now. Also, any API additions or other enhancements to the Java SE platform specification are subject to review and approval by the JSR 270 Expert Group. But beyond these caveats, this list should contain the features that we are currently hoping to deliver in Java SE 6.

Note too that this is not an exhaustive list of everything we in the client group are working on. These are just the larger, more visible, more called-for, or more exciting features that we have on our plate.

Finally, we encourage you to go looking for more information on the Java site. In particular, our bug reports tend to contain our latest thinking about bugs, features, and fixes. For items in this list that contain bug IDs, click on the links or search the bug database to read more about that feature.

We've broken up the list into the different areas of client technology:

Delivered: This is the "build number" in which this fix is or will be integrated. For example, "b27" means "build 27." You can download and test any feature that has a specified build number associated with it. For features not yet completed, there is no build number. We plan to update this document as fixes are delivered.

Bug IDs: These are links to bug reports that contain more information on the issues and fixes.

Description: This is a description of the feature. We will link to others' write-ups about these features as appropriate.

Java Foundation Classes/Swing Technology

The most important driver for Java Foundation Classes/Swing (JFC/Swing) technology is improving its platform look and feel -- specifically, making sure that the look and feel of JFC/Swing's Windows and GTK match the underlying platform's look and feel. Beyond that, we will be rounding out the capabilities of various components.

After fixing 6185456, Swing components will use GTK's rendering engine. This portion of this feature is to make sure each of the components looks and behaves correctly. That is, each component provides the appropriate feedback, has an appropriate size, and matches the underlying component.

Feature: New Examples Bug IDs: 6246816, 6246820, 4989244Status: In development Description: Swing's current examples do not illustrate best practices and are not representative of real applications. With that in mind, we plan on providing two distinct types of examples. One shows all the widgets in all possible states. SwingSet2 currently serves this purpose but has grown stale and out-of-date. The second example type is one that better matches a real-world application, showing best practices in using the toolkit.

Add the ability to get the baseline for various components,extending the appropriate layout managers where it makes sense. Check out Scott Violet's blog article for more information about baseline layout.

Add the ability to get preferred spacing between components. That is, each look and feel offers different guidelines as to how far apart components should be placed during layout. This API will allow you to get this information.

Feature: Improve Swing's drag-and-drop support Bug IDs: 4521075, 4468566, 4942851, 5029427, 5029432Status: 4521075 integrated into b36, 4468566 and 4942851 integrated into b42, 5029427 and 5029432 duplicates of 4942851 (thus, fixed in b42) Description: Using drag and drop is currently difficult with Swing: The built-in drag gesture recognition in Swing components is unlike what users expect, and the drop support is very simple and difficult to customize. This feature will not only fix a number of drag-and-drop bugs but will also make the Swing drag-and-drop system much more powerful and easy to customize. For more information on Java SE 6 technology's improved drag gesture recognition (the fix for 4521075), check out the entry "Improved Drag Gesture in Swing" in Shannon Hickey's blog. For more information on the major improvements to drop support (resolution for the other four bugs), see his blog entry "First Class Drag and Drop Support."

Feature: Provide true double buffering Bug IDs: 4967886Status: b32 for Windows, b48 for Solaris and Linux Description: Where it makes sense, have Swing provide true double-buffering support. This will provide two immediate advantages: exposing a Java application (moving an application to the front that was previously obscured) will be nearly instantaneous, and an application that hangs the event dispatch thread can still have its contents restored during an expose event. For more information on this feature, check out Scott Violet's blog.

Feature: JTable sorting and filtering Bug IDs: 4747079Status: b39 Description: Add the ability to sort, highlight, and filter the contents of tables. Portions of this work will come from JDNC. For more information on this feature, check out this tech tip.

Feature: SwingWorker Bug IDs: 4681682Status: b39 Description: SwingWorker was originally published in 1998 in the article Threads and Swing. Since that time, developers have continuously requested we move it into core. At the 2004 JavaOne conference, we presented a new version of SwingWorker that included generification, use of the concurrency package, and PropertyChangeListener support. This work will place a version very similar to the one shown at the 2004 JavaOne conference into core.

Feature: Text printing Bug IDs: 4791649Status: b39 Description: Add printing support to JTextComponent, including the ability to specify a customer header or footer and layout to printed page size.

Feature: Ability to use arbitrary components as the tabs of a JTabbedPaneBug IDs: 4499556Status: b34 Description: JTabbedPane currently limits the contents of a tab to a string and/or an icon. This feature allows you to embed arbitrary components, such as a JPanel containing a label and button, as the tab. For more information on this feature, check out Alex Potochkin's blog.

The high-order bits for the Java 2D API in this release are quality issues and performance. Most of our work is related to these overarching goals.

Feature: Single-Threaded Rendering (STR) Bug IDs: 6219284Delivered: b27 Description: This is a rearchitecture of our multithreaded rendering code for the OpenGL rendering pipeline, to make Java 2D graphics faster, our code cleaner (read: less buggy), and to make our OpenGL renderer more ready for prime time. Although only enabled for OpenGL in this release, STR is the basis for our other accelerated rendering pipelines in the future. (We can't wait to make this work on our DirectX pipeline in the next release!) For more information, check out Chris Campbell's blog articles, STR-Crazy and STR-Crazier.

Feature: More and better graphics hardware acceleration on Windows Bug IDs: 5104393Delivered: b33; disabled by default for now, enabled through the command-line flag -Dsun.java2d.d3d=trueDescription: We are rewriting our native code on Windows that uses Direct3D to take much better advantage of the graphics acceleration capabilities on that platform. As of J2SE 5.0, we only use Direct3D for drawing diagonal lines and rectangles (we use DirectDraw for filling rectangles, horizontal/vertical lines, and image/buffer copies). We also use Direct3D for translucent image copies, but only when specified on the command-line ( sun.java2d.translaccel=true). The idea here is to restructure our DirectX code on Windows to more closely resemble that of our OpenGL rendering pipeline, which has acceleration for the very simple operations above, but also more interesting and powerful features such as transforms, text (antialiased and otherwise), complex clips, and translucent operations. For more information, check out this blog article or Dmitri's posting to a javagaming.org forum.

Feature: Improved text quality and capabilities Bug IDs: 4502804, 5057760, 4871297, 4726365Delivered: b39 Description: This umbrella feature addresses the key bugs and RFEs needed to make Java text -- and Swing text in particular -- offer the same capabilities as native text on all supported platforms. The main items to be delivered include the following:

Enable additional text antialiasing modes

4726365: LCD text: Use the characteristics of LCD displays (which have addressable red, green, and blue subpixels for each whole device pixel) that can increase the perceived display resolution. Users of LCD panels on Windows and Linux desktops commonly see this feature.

4726365: Font-specific antialiasing settings: Use information in the font to indicate whether text should be antialiased at a particular size. This is what users of CRT (non-LCD) displays see on Windows. These capabilities will be available to applications as additional values of the same Java 2D Rendering Hint currently used to antialias text.

Fix rasterization bugs (for example, 4924220): In specific instances, our rasterization of particular glyphs is poor or is significantly different from the way that the native text rasterizer renders those same glyphs, resulting in Swing looking different than native applications. We need to work through these cases and fix the bugs.

Respect desktop text antialiasing settings (bugs 4502804, 4871297): The Windows Look and Feel for Swing currently runs non-antialiased by default, no matter what the user has selected for desktop text settings, because there was no way for Swing to request the same behaviors as the native platform. The GTK Look and Feel for Swing already uses text antialiasing if it is a desktop setting, but it cannot request LCD text antialiasing mode. This feature addresses this issue for the native look and feel, which will automatically detect and use the desktop settings.

For more information, check out this blog article. Around July 26, java.net will publish an article on how LCD text rendering works in general.

Feature: Curved primitive rasterization Bug IDs: 4151279Delivered: In development Description: For some time, people have complained about the look of our ovals, round rectangles, and arcs. We need to fix these problems and make these simple shapes look more reasonable.

Internationalization for JDK 6 is pluggability of some locale-dependent components in the Java SE platform. This new functionality in Java SE 6 will ease the way to deal with more locale-specific features.

Feature: Locale-Sensitive Services SPI Bug IDs: 4052440Delivered: b38 Description: This feature will enable plug-in of locale-dependent data (for example, date format strings) and services (for example, date formatters). This project plans to add some Service Provider Interfaces (SPIs) for locale-sensitive classes in the java.text and java.util packages. These SPIs will make it much easier for developers to provide support of more locales in addition to the currently available locales in the Java SE platform. For example, your own implementation of BreakIterator for Chinese could become available through the BreakIterator.getSentenceInstance factory in the Java runtime. For more information on this feature, check out Norbert Lindenberg's blog article Locale-Sensitive Services SPI.

Feature: ResourceBundle enhancements Bug IDs: 5102289Delivered: b38 Description: There have been a number of requests to enhance the current ResourceBundle functionality, especially to improve the flexibility of the ResourceBundle.getBundle factory. This project plans to open up the steps of the resource bundle-loading process and its cache control so that each step may be substituted with an application-provided one. For example, you can specify getBundle to look up only properties-based resource bundles, thus avoiding the overhead of never-existing-class-based-bundle lookups. For more information on this feature, check out Norbert Lindenberg's blog article More Control Over ResourceBundle.

Feature: Japanese calendar support Bug IDs: 4609228Delivered: b34 Description: This project will add a new Calendar implementation supporting the Japanese Imperial era-based year numbering, such as Heisei 17 for 2005 (Gregorian). An instance of this Calendar implementation could be created through the Calendar.getInstance factory by specifying a Locale("ja", "JP", "JP"). The SimpleDateFormat class will support calendar specific eras and date formats.

For this release, AWT plans to implement long-awaited features (small and big) related to Desktop Integration.

Feature: New modality modes Bug IDs: 4080029, 4167266, 4813288, 4866704Delivered: b38 Description: Problems with modality have been plaguing developers for years. Bug 4080029, which was filed in 1997 and had 463 votes at last count, is in the Top 25 bug list and is an unfortunate proof of the existence of such problems. In Java SE 6, we will try solve most of the modality problems by introducing several new modality modes (such as application modality, toolkit modality, and document modality) as well as exclusion from modality, which is useful for the applications like JavaHelp (see 4813288, for example). The implementation and API-design work is done; we are now polishing things up and preparing for the final putback.

Feature: Pop-up splash screen at beginning of Java startup Bug IDs: 4247839Delivered: b40 Description: Many performance problems are actually issues of "perceived performance," in which the amount of time an operation takes is not as important as the fact that the GUI should be responsive in the meantime. This perceived-performance problem can apply to application startup time: If an application takes several seconds to start and nothing happens on the user's desktop in the meantime, the user sees this as a performance problem with the application. If that application is able to do something simple in the meantime to show that it is actually working, the user's perception of it improves greatly. This is the impetus for splash screens: Show the user something related to the application even if the application is not yet in a usable state.

Think of this feature like an on-hold phone messaging system: You listen to boring smooth jazz while you're on hold. Every minute or so, a voice comes on and tells you that someone will probably answer your call eventually, unless you hang up and try again, in which case you are doomed to repeat this tedious process. The splash screen is kind of like that voice ("this application will be with you very soon"), only not nearly as annoying.

This feature would allow one to show a splash screen during the Java startup. The splash screen functionality would support various image formats (GIF, PNG, JPEG), including animation and transparency capabilities supported by the image formats. There is also some simple Java API that allows you to plug into the splash screen and display such items as application loading progress or runtime messages. For more information on this feature, check out this tech tip.

Feature: API to add a Java application to a system's app-launching panel/toolbar Bug IDs: 4310333Delivered: b38 Description: This feature started as part of the JDIC project, and we are moving it into the Java SE platform. The main functionality remains the same: It allows you to create a "tray icon," add it to the "system tray area," and listen for various events on it. The original API from JDIC has been rewritten, but the implementation remained almost intact. This project shows that there is a simple way to contribute to the Java SE platform: Participate in or start a highly demanded feature-project (preferably on java.net), and one day it may become integrated into the Java SE platform!

Feature: Input in non-English locales Bug IDs: 4360364, 4490692, 5033605, 5064016, 4725203, 5057184, 4957565, 4960727, 5014911, 4799499Delivered: b40 Description: This is basically a big bug-fix. We are well aware that the input in non-English locales on Linux and Solaris operating systems is sometimes just impossible, and we are working on resolving the various issues. We have refactored our code and fixed important internal design flaws that were causing those problems. Once we have integrated these fixes, we invite you to test the changes in your favorite locale and file a bug if it still does not work for you. If we find out about the problems early enough, we may be able to fix them in Java SE 6 as well.

Improve usability in many UI dialogs, especially the security warning for signed applets and signed applications.

Feature: Unified download engine for Java Plug-in and Java Web Start software Bug IDs: 4802551, 6213959, 6213963, 4978699, 6213967, 6213976, 4414439, 6213985, 4897990, 4690736Delivered: b28, b32, b34, b39 Description: This is a rearchitecture of the download engine that will be used by both Java Plug-in and Java Web Start software. It will provide a consistent download and caching model, and it will also support many download and caching enhancements:

Feature: Default Java on Linux Bug IDs: 6211006Delivered: b38 Description: Both Windows and Solaris operating systems have the concept of a default "java": Just type "java," and something wonderful happens. This feature is to bring the concept of default "java" to Linux so that developers and users can access the latest greatest versions of "java" on the system without hardwiring the path.