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

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

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

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

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