The designers of the Swing user interface components of the Java Foundation Classes (JFC) designed each component around a pattern called Model/View/Controller (MVC). The result is a user interface toolkit of almost unmatched flexibility. This month we'll explore Swing's underpinnings and build our own user interface components. (2,600 words)
Slow GUIs are one of Java's biggest performance problems. This Java Tip shows you how to create GUIs that construct faster by building only the necessary parts. (1,000 words) By Mark Roulo
3. User interfaces for object-oriented systems, Part 4: Menu negotiation
This month's article continues the series on UI design for object-oriented systems. It starts off by clarifying a few points about the visual-proxy architecture, discussed in previous columns. The main body of the article then moves on to discusses menu negotiation -- a means by which a visual proxy can easily add and remove menus (and line items on menus) from the menu bar associated with the frame that contains the proxy. This facility makes it simple for visual-proxy objects to add menus to the list of visual elements that can appear on their self-created user interfaces. (3,400 words)
4. User interfaces for object-oriented systems, Part 5: Useful stuff
This article begins putting the object-oriented principles discussed in this series to practical use. The author builds a small but nontrivial application: a Reverse Polish Notation calculator that can display a user interface either like a tape calculator or a keypad, depending on a user's runtime selection. The program is a bit large for a single column, though. So this month, Allen covers a set of small tools used for the main program. Next month, he'll build the calculator itself. (2,800 words)
5. User interfaces for object-oriented systems, Part 6: The RPN calculator
This month's Java Toolbox completes the object-oriented UI design series by presenting the rest of the Reverse Polish Notation calculator application introduced in January. The calculator demonstrates several of the object-oriented UI principles discussed in Allen Holub's previous articles, particularly the visual-proxy design pattern as well as several Gang of Four design patterns such as Adapter and Mediator. This application isn't just a toy, says the author, who uses it frequently. (4,700 words)
6. Building user interfaces for object-oriented systems, Part 1
This month's article, the first of a series on user-interface construction in object-oriented systems, looks at the underlying theory of object-oriented design from the perspective of the user interface. This installment in the new series serves as a primer on objects, describing exactly what a well-constructed object is -- and isn't -- and how it should behave with respect to the system as a whole. The author also discusses why the rapid application development (RAD) tools like Visual Cafe and Visual J++ aren't particularly useful in an object-oriented environment. A thorough understanding of the underpinnings of object-oriented programming is essential to understanding the user interface solutions you'll be building over the next few months. (9,000 words)
7. User interfaces for object-oriented systems, Part 3
This month's column continues the object-oriented design/GUI theme from the July and September Java Toolbox columns by looking at a widget that I use all the time: a wrapper around a Collection capable of creating a visual proxy that automatically changes its appearance. By examining the amount of screen real estate available to it, the widget displays the Collection as a combo box, a list, or a button that pops up a frame containing the list when pressed. This sort of dynamic adaptability is essential when implementing user interfaces for object-oriented systems, since the context in which a particular attribute will be displayed is often unknown at compile time. (3,000 words)
8. Build user interfaces for object-oriented systems, Part 2: The visual-proxy architecture
This month, author Allen Holub returns to his discussion of user interfaces and explains how to implement a user interface without violating the encapsulation of an object with get/set methods. Using what he describes as a "visual-proxy architecture," Allen solves most of the scalability problems associated with Model/View/Controller, while still tightly encapsulating an object's implementation. (8,500 words)
JDK 1.2 is already in its fourth beta release, gathering steam for its full release sometime this fall. One of its key features is the now fully integrated JFC, which, with its Swing GUI library, will revolutionize Java GUI design and implementation. But why wait until fall? With Michael Shoffner's help, you can start today. Using the Forum application of past columns, this article explores the fundamentals of the JFC and Swing and demonstrates how to develop and deploy your own applications with these cutting-edge technologies. (2,900 words)
This second article in a two-part series demonstrates how to add event handling and networking to the newly resurfaced Swing Forum client. Michael begins by examining the JTree component, which facilitates user interaction in the Swing Forum. He then focuses on how the 1.1 event model and anonymous classes allow you to efficiently handle events. Finally, he guides you through the code changes to network the Forum. (2,500 words)