Java Tip 142: Pushing JButtonGroup
Swing's ButtonGroup class allows radio button grouping to ensure single selection; however, the implementation raises many question marks. You cannot retrieve a reference to the currently selected button in the group, and the class lets you select or deselect any button accessible through a reference, not just those belonging to the group. This tip describes how JButtonGroup subclasses ButtonGroup to offer a more solid implementation, while providing convenience methods that make JButtonGroup much simpler to use.
Daniel Tofan, September 2003

Implement a J2EE-aware application console in Swing
Learn the fundamentals of Swing while creating a command console to control complex enterprise applications. A console provides a window into a system's operation and allows operators to configure, monitor, and control the system in real time. This article shows how to construct a generic console from Swing components that uses the Java Messaging Service (JMS) to interact with one or more application subsystems. Java 2 Platform, Enterprise Edition (J2EE) 1.3-compliant application components implement a JMS interface automatically, which makes integration with this console especially easy.
John Chamberlain, November 2001

Create a scrollable virtual desktop in Swing
The JScrollableDesktopPane class builds upon the Swing component classes JDesktopPane, JScrollPane, JToolBar, and JMenu to provide a virtual desktop environment replete with dynamic scroll bars, dynamic menus, and dynamic button shortcuts. JScrollableDesktopPane interfaces seamlessly with current JDesktopPane implementations, allowing you to easily enhance existing Java Multiple Document Interface (MDI) applications.
Tom Tessier, November 2001

Java Tip 119: Don't know much about file history?
Many file processing applications have a history mechanism that tracks the last processed files. Typically these filenames are appended to the bottom of a File menu in the order you have processed them. This tip provides a class that encapsulates all the code you need to add such a file history mechanism to your own application. Discover the key "hot spots" to link the mechanism into the JFrame used to build the heart of your application. The code is based on Swing, as provided with JDK 1.2 or JDK 1.3.
Klaus Berg, November 2001

Two if by sea
October 19, 2001
Tony Sintes, October 2001

Don't be late for that important date
October 5, 2001
Tony Sintes, October 2001

Java Tip 116: Set your table options -- at runtime!
The JTable class offers rich functionality for grid-like data display. This Java tip addresses common display issues related to dynamically changing such things as scroll bars, column width, and row height.
Sonal Goyal With John D. Mitchell, September 2001

Conquer Swing deficiencies in MDI development
You can easily overcome some notable Swing deficiencies when creating Multiple Document Interface (MDI) applications. In particular, this article shows you how to simply add scrolling and a standard windows menu to your MDI apps. (1,300 words)
Gerald Nunn, May 2001

Embed Java code into your native apps
Embedding Java code into a Unix application developed in C or C++ can create problems related to GUIs or threads synchronization. In this article, Thierry Manfé implements a solution that relies on a good understanding of the Unix APIs and robust software architecture. (2,400 words)
Thierry Manfé, May 2001

Does Sun understand GUI design?
Sun has done a great job with Swing, but Java has failed to dominate the client side like it has dominated the server side. This could be related to the fact that Sun's roots are in Unix. (650 words)
Anil Hemrajani, May 2001

The magic of Merlin
This technical overview will give you insight into the various new features and APIs of the upcoming JDK 1.4 -- code-named Merlin. The beta version is expected to be released this month. (3,000 words)
Vinay Aggarwal, March 2001

Java Tip 109: Display images using JEditorPane
To display HTML in a JEditorPane, you would normally specify a URL that sets the document base of the HTMLDocument. However, if the HTML text is not stored in a file locally or on the Web, you cannot set the HTMLDocument document base. That becomes a problem when the <IMG> tag uses a relative path to specify the image location, but it can be overcome by modifying JEditorPane and its associated classes. (2,000 words)
Rob Kenworthy, March 2001

Browse user interfaces for Jini services
The ServiceUI specification developed by the Jini.org community defines a suggested procedure for attaching user interfaces to Jini services. In this article, Jeffrey Peden -- a new contributor to the Jiniology column -- introduces you to a simple ServiceUI-based example service. Then he shows you how to build an application for browsing and launching user interfaces for Jini services.
Jeffrey Peden, March 2001

Speed up file searching in JFileChooser
Traditionally, users choose files by scrolling the file chooser's list with their mice. You can speed that process by enhancing JFileChooser with a type-ahead method: the user just types the first few characters of a filename to select the desired file. This article shows you how to do just that. Plus, you'll learn how to register listeners on a compound component's descendants to extend JFileChooser's functionality. (2,000 words)
Slav Boleslawski, February 2001

Become a programming Picasso with JHotDraw
Design patterns and frameworks have a mutually beneficial relationship. A well-known example of this is JHotDraw, a highly customizable GUI framework that simplifies developing drawing applications. This article explains the JHotDraw framework and general framework principles in terms of several important design patterns. You'll develop a class diagram editor that demonstrates JHotDraw's usage and capabilities. (4,000 words)
Wolfram Kaiser, February 2001

All

Wizard API updated!
Tim Boudreau has released a new version of the Swing Wizard library (version 0.997) that fixes the WizardException bug reported in JavaWorld's recent Open Source Java Project profile. The article's examples have been reworked to test out the new, improved WizardException. Thanks, Tim, for this helpful fix!
Open Source Java Projects: The Wizard API

Newsletter sign-up

Sign up for our technology specific newsletters.

Enterprise Java
View all newsletters

Email Address: