Sams Teach Yourself Java 2 in 24 Hours

Sams Teach Yourself Java 2 in 24 Hours

By Rogers Cadenhead

Q&A

  1. Is there a reason to display scrollbars only when they are needed, as opposed to displaying them all the time?

    Normally, the decision is based on how you want the interface to look. Some interface designers prefer to have the scrollbars visible at all times, while others make them visible only when the component needs them.

    With early implementations of scroll panes in Java 2, scrollbars would disappear in certain instances and never reappear. Though this appears to have been resolved, making scrollbars visible at all times is a way to work around a problem like this.

  2. How can I find out about the rest of the Swing classes in the Java class library?

    On Sun's official Java site, the full documentation for the Java class library is published at http://java.sun.com/j2se/1.4/docs/api/. You can see the classes that are included in javax.swing, java.awt, and java.awt.event, the packages that were covered during the preceding four hours. All Swing classes and interfaces are documented, including their constructor methods, class variables, and instance variables. There are also links to some of Sun's official tutorials for Swing programmers.

Share ThisShare This

Informit Network