Client-Side Development Section Index | Page 85
JLabel actually does provide just enough space for the text plus the leading (space between lines). You can do something like the following, though it is not recommended. This subclass of JLabel ...more
The 1.3 Java release includes a Robot class to generate low-level native mouse / keyboard input events at the operating system level. The other alternative is to call postEvent() of the EventQueu...more
See Effective Layout Management at the Java Developer Connection.
The short answer is no. The libraries are part of the standard Java 2 platform release (starting with version 1.2). Since they modify core classes in the java.awt.* libraries, you can not pull the...more
This capability is currently not supported.
Where can I get the Netscape capabilities classes so I can compile programs that use Netscape's Capabilities API?
Besides pulling the classes out of the browser directory, you can download a zip file of the classes from http://developer.netscape.com/docs/manuals/signedobj/capsapi_classes.zip.more
By default, Netscape limits the number of applets loaded to 10. when that limit is exceeded, older ones will become elligible for garbage collection. To increase the limit, you would call the setA...more
<APPLET // Required CODE = appletClass or OBJECT = serializedApplet HEIGHT = pixels WIDTH = pixels // Options CODEBASE = codebaseURL ARCHIVE = archiveList...more
The Swing text components come with built in support for undoing and redoing text operations. All you have to do is associate an UndoManager to the Document of the text component: JTextField textF...more
These look and feels are locked to only work on their native operating system. Sun felt there were copyright-related issues with running these on other than their native operating system. If you ...more
History When Swing first came out, Sun wanted to make it available for JDK 1.1.x, but have it be part of the core Java class libraries for the Java 2 platform (then known as JDK 1.2). This presen...more
How do I get rid of the Unsigned Java Applet Window message at the bottom of windows/frames I create in my applet?
This is a security feature to prevent untrusted applets from displaying what appear like trusted windows. If you sign your applet and the user trusts you, the message will go away.
Check out the tooltip example from the Swing samples application that ships with the JDK. You can use embedded html tags in the text of the tooltip to produce the desired result in a platform inde...more
When you register an event handler, you must pass it an instance of some class that implements its listener interface. Simple Event Handler Start with a simple example. Suppose we want to print "...more
It depends what you mean by 'accept'. You can validate the choice at three times: As the user types characters After the user is done with the field After the user is done with the GUI ...more