Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Hacking Swing with Undocumented Classes and Properties

Swing is a powerful toolkit for building desktop applications, but quite often Swing gets a bad reputation for sins of the past. Many times, I've heard, "Swing is slow," "Swing is ugly," and "Swing is too hard."

Tutorial Details:

The Windows task bar with its own icon. If you are using Windows XP, then the application icons may collapse together, but they are still there. However, if you subclass java.awt.Window instead of java.awt.Frame, then your window will not show up in the taskbar or the Alt-Tab hotswitcher. This is because the window won't be registered as a full "application window" that the operating system treats with special care. Instead, the window will be more like a dialog box.

The disadvantage of directly subclassing Window is that you won't get any window decorations. The title bar and maximize, minimize, and resize buttons will be missing. Even the border will be gone. However, depending on your use, this might not be a problem. Toolbar palettes, for example, are fine without borders and should properly be hidden from the taskbar. Also, the recent trend towards mini-application development (Tiger Dashboard, Yahoo Widgets) suggest that the lack of a title bar won't be a problem.

Make Mac OS X Windows Transparent (For Real)
Mac OS X has a graphics API called Quartz that makes it very easy to create translucency effects. This API isn't directly accessible from Java, but Apple's developers did provide a really nice feature that uses Quartz. If you make the background of your frame partially transparent, the desktop and other applications will show through. For example, if you had a frame with a few buttons on it, you could call this right before you set the frame:


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Hacking Swing with Undocumented Classes and Properties

View Tutorial:
Hacking Swing with Undocumented Classes and Properties

Related Tutorials:

Focus on Swing - JavaWorld - July 1998
Focus on Swing - JavaWorld - July 1998
 
Java Tip 42: Write Java apps that work with proxy-based firewalls - JavaWorld - December 1997
Java Tip 42: Write Java apps that work with proxy-based firewalls - JavaWorld - December 1997
 
Java Tip 72: Press Escape to close your Swing dialog windows
Java Tip 72: Press Escape to close your Swing dialog windows
 
Java 2 introduces print capability to the Swing Forum - JavaWorld June 1999
Java 2 introduces print capability to the Swing Forum - JavaWorld June 1999
 
Problems with Swing's new XMLOutputStream class - JavaWorld August 1999
Problems with Swing's new XMLOutputStream class - JavaWorld August 1999
 
Embed Java code into your native apps - JavaWorld May 2001
Embed Java code into your native apps - JavaWorld May 2001
 
Implement a J2EE-aware application console in Swing
Implement a J2EE-aware application console in Swing
 
Take command of your software
Take command of your software
 
Speed up your Swing GUI construction with better building blocks
Speed up your Swing GUI construction with better building blocks
 
Customize SwingWorker to improve Swing GUIs
Customize SwingWorker to improve Swing GUIs
 
An AI tool for the real world
An AI tool for the real world
 
Interesting ...
Interesting ...
 
JHttpTunnel
JHttpTunnel is the implementation of GNU httptunnel\'s protocol in pure Java.
 
SpeedJG - XML Builder
SpeedJG - XML based Java Swing GUI Builder
 
Data Models for Desktop Apps
Data Models for Desktop Apps This is the third article in a series that presents the prototype of a Java desktop application called JImaging. The first article described the three major Java GUI toolkits: AWT, Swing, and SWT. In the second article, I int
 
JDemo
JDemo is the Java demonstration framework. Its concept is similar to the one of JUnit. As supplement to test driven software development, JDemo provides a new approach of demo driven development: When developing software, you write short code snippets (
 
Commons Launcher
The Launcher Component is designed to be a cross platform Java application launcher.
 
iCal4j
iCal4j Overview iCal4j is a Java library used to read and write iCalendar data streams as defined in RFC2445. Providing both a parser and an object model, iCal4j allows you to either modify existing iCalendar data or create new data models. Validation
 
Open Source Web Frameworks in Java
Open Source Web Frameworks in Java Open Source Web Frameworks in Java Struts Struts Frame work is the implementation of Model-View-Controller (MVC) design pattern for the JSP. Struts is maintained as a part of Apache Jakarta project and is open
 
Advanced Synth
Take an in-depth look at the Synth look and feel, the newest addition to Swing introduced in Java 5.0. Synth lets developers rapidly create and deploy custom looks for an application by introducing the concept of a "skin" to Java UI programming.
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.