Owl Teach Yourself Java 2 in 21 Days Professional Reference Edition, Second Edition
HOME / ORDER THE BOOK / OTHER BOOKS / THANKS / PREVIOUS DAY / NEXT DAY

Day 8: Working with Swing

Notes and Corrections

  • None.

Source Files

Reader Questions

  • Question: The combo box example on page 219 does not allow the entry of text. How do I get it to accept text entry?
    Answer: The Expiration application uses a drop-down list instead of a combo box. To change a JComboBox component so that it can receive text input, call the component's setEditable(boolean) method with an argument of true before you add the component to a container.
  • Question: The SimpleFrame application compiles successfully, but when I try to run it (or any other Swing application), I get this error: "java.lang.UnsatisfiedLinkError: no fontmanager in java.library.path." What's the problem?
    Answer: I can't reproduce this error myself, but after looking through Sun's Java bug database and support forums, it appears to be a problem with font support on your computer.
         On a Windows system, the Java font manager is in a file called fontmanager.dll. To see all the folders in your library path, call System.getProperty("java.library.path") in a Java application and display the string that it returns. (I've written a short application that does this: download SeeLibraryPath.java and SeeLibraryPath.class) Check to see if fontmanager.dll is in one of the folders in the library path. If it isn't, you need to remove and reinstall the Java 2 SDK and the Java 2 runtime.
         If fontmanager.dll is in the right place, you might want to check this JBuilder tech support tip for a fontmanager problem. It advises that you should remove each shortcut from your \Windows\Fonts or \Winnt\Fonts folder and replace it with the actual font the shortcut refers to.

Activities

HOME / ORDER THE BOOK / OTHER BOOKS / THANKS / PREVIOUS DAY / NEXT DAY

Workbench | Books | RSS Feed | RSS Spec | Copyright 2024 World Readable