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:
|