AWT Section Index | Page 2
The 1.4 API increased the accessibility API by adding the following: javax.accessibility.AccessibleEditableText javax.accessibility.AccessibleExtendedComponent javax.accessibility.AccessibleExt...more
The original accessible API set missed some features in the AccessibleComponent interface. Since the main interface couldn't be altered, Sun introduced a secondary interface AccessibleExtendedComp...more
Either by setting the AWT_TOOLKIT environment variable or the awt.toolkit system property. The AWT_TOOLKIT environment variable can be set to XToolkit or MToolkit depending upon which of the Unix...more
J2SE 5.0 reimplemented the AWT Toolkit to remove the Motif and Xt dependency and improve performance. Solaris still keeps the Motif default but Linux machines uses the newer XToolkit as its default.more
Short answer: EventQueue. Longer answer... Utility methods were added to the SwingUtilities class because the first version of the Swing classes had to work with JDK 1.1, even though Swing was re...more
I want the user to be able to input tabs in my application, but the tab character moves the input focus to the next component in the app and my application's keylistener gets nothing. Is there any way to change this behaviour ?
The tab is a focus traversal key by default and you have to change this to catch the tab entries in your keylistener. You do this by overriding the Component method : getFocusTraversalKeys(int id)...more
Patent restrictions didn't allow a GIF writer to be part of the Java platform prior to JDK 6. With the recent expiration of the Unisys patent, JDK 6 includes support. import javax.imageio.*; impo...more
The Java 6 Desktop class has a mail() method for just such an action.
Java 6 offers a SystemTray class for this. Users of prior versions of Java can add this through the JDesktop Integration Components (JDIC) available from https://jdic.dev.java.net/. You'll find a ...more
You can call reset() to remove the existing set of points from a Polygon. With that said, according to the javadoc: All internally-cached data relating to the old vertices are discarded. Note that...more
Sun provides the Java Access Bridge for Microsoft Windows users, with programs like Monkey and Ferret to see how well you've designed your graphical programs to take advantage of assistive technol...more
I'm using setComponentZOrder() to have overlapping components but the last component I click on is always drawn on top. How do I fix this?
When components overlap, be sure their container returns false from the isOptimizedDrawingEnabled() method that is inherited from JComponent. This ensures that lower z-order components are not dra...more
How can I control the Z-order that my overlapping components are drawn in?
To understand z-order, think first of x and y positioning. The x-y coordinate space places position (0, 0) at the top-left corner of the screen. Increasing the x value moves the position to the ri...more
The initial answer is "you don't; AWT does". Graphics objects are your "window" into an image, whether that image is onscreen or offscreen. If you're looking to paint onscreen, the only way you ...more