Claude Duguay

Subscribe to Claude Duguay: eMailAlertsEmail Alerts
Get Claude Duguay: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Top Stories by Claude Duguay

This month we have a colorful widget for you. While the JFC provides a pretty nice color picker, it doesn't seem to go the extra mile that users of imaging software have come to expect. Once exposed to that software, some users have become pretty sophisticated and you have to use a well-designed color selection control - should you need one in your application - to make a good impression on them. This column explores a widget called JColor that provides six views on the color spectrum in a single, easy-to-use interface. Figure 1 shows the JColor control in action, with the Blue view activated. The six views correspond directly with the red, green and blue of the RGB model and the hue, saturation and brightness of the HSB model. The RGB and HSB color models are based on three dimensions, something often difficult to visualize on a flat display. Our approach uses the ... (more)

JSpinner

It's ironic how sometimes the simplest ideas can turn out to be the most development-intensive. This month's Widget Factory participant is the seemingly modest JSpinner control, which lets you constrain user interface selections by using arrow buttons or up/down keystrokes to increment or decrement values, typically in a field. JSpinner comes with a whole family of siblings to handle numbers, currency, percentage, date, time, lists and custom values. It supports multiple field elements, custom renderers and a compound model to make it all possible. The table at right shows the va... (more)

JOutlookBar

The Widget Factory is a series of articles (a regular column) dedicated to showing you how to develop sophisticated user interface components for your Java programs. We build on the foundation provided by Swing and the Java Foundation Classes, so the only assumption we'll make is that you can compile and run such programs (this code was tested under JDK 1.1.6 with Swing 1.0.2). This first installment of The Widget Factory explores the development of a component called JOutlookBar, which resembles the Microsoft navigation bar provided first in their Outlook mail client and later ... (more)

JMaskField

When you write user interfaces, you inevitably have to collect information from text fields and validate the data before you use it. There are several ways of handling validation. You can verify the text as the user exits the field by watching for lost focus events, or you can wait for the user to dismiss a window or dialog box by pressing a button, thereby validating all the fields at once. Both approaches are useful, but they can also lead to complex scenarios. Providing appropriate feedback and cursor positioning when invalid data is entered can often become complicated. Often... (more)

Jcalendar

It seems ironic that the JCalendar widget was one of the first that came to mind when this column was being conceived. At the time, it seemed likely that Sun would include a calendar component with Swing - there were hints in the beta releases, and the preview directories contained minor evidence that this was one of the areas to be developed. Swing 1.0 was released, later Swing 1.1, then JDK 1.2 hit the streets, and still there was no calendar component. Here you have it - JCalendar - with all the bells and whistles. Overall Design As always, our design places considerable import... (more)