Home | Business News | Browse by Publication | J | Java Developer's Journal

Trimming the fat from Swing. (Graphical API).

Publication: Java Developer's Journal
Publication Date: 01-JUL-03
Format: Online
Delivery: Immediate Online Access

Article Excerpt
I'm sure we've all heard it before: Java on the clients is slow; Swing is slow. The reality is that Sun has made great progress in increasing the speed of Swing and Java on the client.

However, it's up to developers to demonstrate that Java has indeed improved to the point of usability and viability on the client.

To do this, the code needs to be very lean and clean. One of the original problems with GUI creation was the reliance upon Visual Development Tools to design and code the GUI. While these VDTs have come a long way in the last few years, I have found that many developers rely so heavily on the VDTs that they've gotten lazy when it comes to coding the actual functionality of the application.

The Problem

Methods are expensive in terms of execution time. The more method calls made, the slower the application will be. However, there needs to be a balance between speed of execution and good coding standards.

Swing makes a large number of method calls during its startup and execution. This is a price that has to be paid for its design model. What compounds the method calls that Swing requires is the number of method calls the average developer piles on top of Swing.

Multithreading Swing

The Swing API is considered to be single threaded and thread "unsafe." However, for a Swing GUI to be responsive, some actions must be threaded, such as database access.

In a normal GUI construction, if a call to a database is made, the GUI will just sit there waiting for the database access to return. Not only will...

Read the FULL article now - Try Goliath Business News - FREE!   
You can view this article PLUS...

  • Over 5 million business articles
  • Hundreds of the most trusted magazines, newswires, and journals (see list)
  • Premium business information that is timely and relevant
  • Unlimited Access

Now for a Limited Time, try Goliath Business News - Free for 3 Days!
Tell Me More   Terms and Conditions

Get Goliath Business News for 1 year - Just $99 (Save 65%)
Tell Me More   Terms and Conditions

Already a subscriber? Log in to view full article



More articles from Java Developer's Journal
Avoid bothersome: garbage collection pauses: use Java in mission-criti..., July 01, 2003
The MIDlet marketplace. (J2ME Insight)., July 01, 2003
Xlet: the life cycle of an Xlet: a different kind of Applet for J2ME. ..., July 01, 2003
Java.net.NetworkInterface: a road warrior's friend. (Network Connectiv..., July 01, 2003
ExtenXLS Java/XLS Toolkit 2.1. (Labs)., July 01, 2003

Looking for additional articles?
Search our database of over 3 million articles.

Looking for more in-depth information on this industry?
Search our complete database of Industry & Market reports by text, subject, publication name or publication date.

About Goliath
Whether you're looking for sales prospects, competitive information, company analysis or best practices in managing your organization, Goliath can help you meet your business needs.

Our extensive business information databases empower business professionals with both the breadth and depth of credible, authoritative information they need to support their business goals. Whether it be strategic planning, sales prospecting, company research or defining management best practices - Goliath is your leading source for accurate information.