Desktop Java Live: UIDefaults Confusion
I ran across some confusing functionality with UIDefaults the other night. Let's see if anyone agrees with me...
The UIDefaults object associated with look and feels in Swing extends Hashtable and holds mappings for look and feel related properties. You'll find things like icons, colors. fonts, etc. Adding to this complexity is the fact that there are actually three sets of UIDefaults user, look and feel, and system. Because of this when you call
UIManager.getDefaults()
it says you are getting a plain UIDefaults object but you are not. Instead you get this strange MultiUIDefaults object that extends UIDefaults. It basically wraps the three sets of objects and looks through them all on a get request for a property starting with the user set. All of this is well and good. The MultiUIDefaults object provides custom implementations of standard methods like get(), size(), clear(), and remove(). Now on to my strange fact for the day. I'm writing a UIDefaults viewer for the book and wanted to iterate over all the properties. So logically I call
uiDefaults.keySet().iterator()
However, strangely my table only has about 5 properties in it. I knew that wasn't right. Turns out that MultiUIDefaults implements keys() which returns and Enumeration but not keySet(). Without looking at the source I would have never known this. When you extend a class should you not try to keep the meaning/spirit of its methods consistent with the parent? I really don't think I'm asking too much here.
Utility Based Development Approach; Applying Forward Thinking to Your
Programming languages have evolved from machine language to today's high level languages such as Java, C++ etc. With the evolution of these languages, our outlook towards solving a problem has also evolved. This month Samudra clears up the mystery behind the "Utility Based Development Approach"of development and how it can help you to be a better programmer.
The Architecture of Eclipse
The Architecture of Eclipse
Every Object-Oriented developer should study the architecture of Eclipse. Everyone who learns Object Oriented Programming (OOP) learns it from the perspective of "programming in the small". That is, they know it from the point of view of developing programs by a single developer or a small team of developer. However, when you have tens to hundreds of developers then a lot of tried and true ideas of OOP simply break down and cannot scale.
I'll agree that anyone serious in desktop development should take a look at Eclipse as well as Netbeans Platform. Regardless of whether you are using Swing, SWT, or some other GUI toolkit the general architecture patterns are worth absorbing.
[ 12 Oct ][ Article ]: J2ME MIDP Currency Converter Tutorial for NetBe
The Currency Converter Tutorial guides you through the process of using NetBeans IDE 4.0 to create a simple J2ME MIDP/CLDC application and test it for multiple mobile devices.
What do you want?
More on this year's JavaOne abstracts
Perkup Java Alerting Framework
Adam Sanderson emailed me a while back about his alerting framework for Java. I had meant to include it in the daily links but somehow got side tracked. So Adam ... sorry about that. Instead I'll give Perkup its own blog post.
Perkup Java Alerting Framework
Perkup is a Java library designed to show non intrusive alerts to user. The library is simple enough that it can be invoked with a single line of code:
Notifier.getDefault().alert("Hello World");
This would send a popup alert to the user. PerkUp is also configurable enough that a developer can create unique alerts, and alerting mechanisms. For instance, although the two current notifiers use Java's Swing for GUI notifications, Notifiers could be written for AWT or IBM's SWT. It would even be possible to integrate non visual technologies such as FreeTTS to create voice notifications.


Generic Examples Needed
Help provide test cases
Wireless on the Road
A few tips and tricks for finding Wi-Fi access on your next road trip.
The Limits of a Rich Web UI
The Limits of a Rich Web UI
Over the past couple of months, I?ve been working on a project implemented as a rich UI. The user interface is presented with Javascript, with the HTML generated on the fly. The info to present is generated by servlets and SOAP services. When I started, this type of UI was new to me, and I did not know Javascript. Now, I know pretty much enough, and can lookup the manuals for the rest...
I've been ranting on this for years now. One day you have a table of data. The next day someone asks can we interactively sort it. Then it becomes editing ... next thing you know you are trying to write an entire application in DHTML and Javascript and it is too late to get out.