The Source for Java Technology Collaboration
User: Password:
Register | Login help    

Search

Online Books:
java.net on MarkMail:


Kodachrome

Posted by editor on September 10, 2007 at 7:32 AM PDT

Making Swing colorful, beautiful, and scalable

Resolution independence has been sneaking up on us for a while, as monitors continue to run at higher and higher resolutions, thereby making purely pixel-based GUIs smaller and smaller on-screen, as the pixels themselves shrink. Josh Marinacci sounded the alarm to Java developers in his blog two years ago: "Every toolkit (Swing included) has certain assumptions about the size of a button or menu item. These assumptions start to break down as screens leave the range our toolkits were originally designed for."

The next version of Mac OS X, Leopard, will be completely resolution-independent, and Windows Vista is getting there, but what about your Swing apps? Are all the GIF-based window decorations and widget pieces doomed to shrink smaller and smaller on user windows?

Fortunately, this bullet may have been dodged. In his blog, Jasper Potts has an update on the Nimbus look-and-feel in Nimbus almost done:

All of Nimbus is rendered with 2D vector graphics, there is not one image even for all the icons. This means that the whole of Nimbus is just 56k as a packed jar which is pretty impressive for a whole rich look and feel.

As the whole of Nimbus is drawn with shapes and gradients it can be scaled to any resolution. You will not be able to control this yet but watch for it in the near future.

He also reports that Nimbus makes heavy use of Painters, and is highly customizable simply by changing values in the UiDefaults table.

Check out Jasper's blog; the screenshots show this is a look-and-feel that looks clean and classy, and the fact that it'll just gain pixels (rather than losing size) on a high-resolution monitor is a nice bonus.


Also in Java Today, A continuing SDN series introduces JavaFX programming by way of client-server examples. The third installment is Learning JavaFX Script, Part 3: Client-Server Communication With JAX-WS, which follows up on the RMI-based Part 2.. "RMI is a fantastic prototyping tool, but it has its limitations for real-world use. A more common solution for programmers creating client-server tools on the Internet is to use a service-oriented architecture (SOA) solution such as the Java API for XML Web Services (JAX-WS). This article will show you how to use JavaFX Script to access a web service using JAX-WS 2.1 in much the same way that the previous article in this series showed you how to use RMI."

The lastest edition, issue 137, of the JavaTools Community Newsletter is out, with tool news from around the web, a link to the community's newest project, guidance on how to graduate an incubated project, and a Tool Tip on making moderation of your project mailing list easier.


In today's Weblogs, Alexey Popov reports on What is new in JT harness 4. "Here you can find my classification of new features available in the new major revision of JT harness that we recently completed."

In a similar "what's new" vein, Marc Hadley shows off some New Jersey Features. "I recently merged the experimental "resourcefactory" branch back into the main Jersey trunk. The new code includes the following features and changes..."

Finally, in JRuby on Rails, NetBeans 6 and GlassFish V2 - Simplified Steps, Arun Gupta writes, "the NetBeans IDE has simplified the steps to deploy JRuby on Rails application on GlassFish. This blog explains the steps and is an update to screencast #web6."


This week's Spotlight is on the Timing Framework, which has just released version 1.0. Chet Haase describes this animation-helper framework in a recent blog, two earlier java.net articles (Timing Is Everything and Time Again), and his recent book Filthy Rich Clients. Chet writes "I figured it was important to declare a 'real' version 1.0, rather than simply incrementing the pre-1.0 version numbers. It's indicative of a lilbrary which, while not yet complete in all of the features that I and others would like to see, is at least solid, stable, and useable in its current state."


In today's Forums, wildfirexy considers the push/pull debate in Re: Push via messaging vs pull via polling.. "Within an imbedded space pull architectures are considered superior simply because a call for example to query a service layer takes a certain ammount of time and therefore an answer can be arrived at a predictable momemt in time. Also with this load on the service can be calculated in advance, all of it makes a poll architecture better in environments which operates on strict time/load constraints. For interactive applications this can be bad from a user's perspective. Simply because an user may judge system to be slow and un unresponsive while waiting for an answer."

In another strategy discussion, tarbo considers proper the relative merits of exception-throwing versus silent errors, in Re: Uncatchable error loading image from URL. "Those are good questions. Should getImage check for existence first, or is that our responsibility as developers? I can answer the latter question, however. Recall that, when you send an URL request to a server, Java uses the URLConnection class. This abstract class has an InputStream to represent data sent by the server, which is anything that is not a header. However, what happens when an image isn't present? If HTTP is used, an appropriate header is returned (likely 404). But it's well possible the image is read directly from the inputstream, which will simply contain 0 bytes, resulting in an empty image. On the other hand, trying to open a stream to an archive that doesn't exist, or to an archive entry that doesn't exist, is likely to cause an IOException instead, because no stream to such a resource can be made. Rather than returning an empty stream, an exception occurs somewhere during execution."

senti2k3 needs help to work with jt harness and java ireless toolkit. "I'm new to java, and I'm setting up a java tck lab environment. I found that to test the midlets, we require a jtharness, me framework, cq3g test suite, javahelp 3.0 and sun java wireless toolkit. Now I don't know how to integrate jtharness with wireless toolkit. so that i can have harness as my server and wtk as my clint end. Or is there any other easy way to set a java tck server .PLs do give me your suggestions, I'm breaking my head with google and my friends to find a soln."


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Making Swing colorful, beautiful, and scalable
Comments
Comments are listed in date ascending order (oldest first)