ComboBox Renderer in a JTable
Some time ago, I posted about adding a ComboBox Editor into a JTable. I now got the trouble report from a customer that those cells that use this ComboBox Editor do not show in any way that you can select their values from a ComboBox. So I had to write a ComboBox Renderer. If there is only one value to choose from, then the renderer will show as a simple JLabel.
ProgressMonitorInputStream
ProgressMonitorInputStream is a FilterInputStream that you can chain to any other input stream. If the data is read very quickly in less time than the user would notice (as for a small file read from a disk) then no dialog is shown. However, if the input begins to take a noticeable amount of time (approximately half a second), then Java pops up a progress monitor. This monitor includes a cancel button. If the user presses that button, then an InterruptedIOException is thrown. Otherwise, input continues and the progress bar is updated until the end of the stream is reached.
10 Most Persistent Design Bugs
1f40
These bugs aren't necessarily fatal. The are all at minimum highly irritating, and they have all survived for a minimum of five years or five product release cycles, whichever came first.
JDNC: A new hope for Swing?
I remember being very excited about JDNC at J1 '03. There was talk about how it would fill the gap and finally make swing something that you could build real apps in. Well, its been 18 months and the progress hasn't been ground breaking, but certainly worth taking note of...
The Swing HTML Parser
The high-level Swing component, JEditorPane, is responsible for displaying, among other things, HTML text. However, this article shows how you can use the HTML parser outside of JEditorPane. An example provided shows how to use the standard HTML parser (also shipped with HotJava) to parse the bookmarks file created by Netscape Navigator.
Rich text layouts in eclipse
Just a quick update on using an HTML-like syntax for component layouts. I previously mentioned my use of the Swing editor pane for layouts and had pretty good results with components. Particularly if they didn't change their preferred size. I've just noticed though that Eclipse is taking a similar approach with their RichText Layout engine.
AceMDI framework: version 1.0 released
ceMDI is a small but powerful MDI framework that facilitates the creation of professional looking MDI aplcations with SWING. It manages your documents in "views", that are represented as closable tabs with system menu when maximized and as internal frames when restored or iconified.
JDNC: "The Gap" .. between Swing and Business Application GUIs
I finally got around to read about JDNC (http://jdnc.dev.java.net/), to download a copy, run through the demos, look at the .jdnc files, and read some of the documentation (tutorials, article, etc..) I am very impressed! I think JDNC is terrific. I mean its goal is right on target. I believe this is where efforts should be concentrated. And they finally are...
Swing: Tables Like Icons Too
Sometimes, tables benefit from not only having text in the cell, but also having an icon. Here is an example screenshot of a JTable intended to look like a Windows file system browser...
Swing: Trees without TreeNodes
Throughout the internet world there are tips regarding JTrees and inevitably they revolve around the javax.swing.tree.TreeNode class and/or the sublcass javax.swing.tree.DefaultMutableTreeNode . It seems that most JTree interaction seems to occur through the use of these TreeNodes. Huge batches of code are devoted to converting a tree of some elements (such as File objects) into TreeNode objects, just so a JTree can be used...