The JavaTM Tutorial
Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Trail: Creating a GUI with JFC/Swing
Lesson: Using Swing Components

Solving Common Component Problems

This section discusses problems that you might encounter while using components. If you don't find your problem in this section, consult the following sections:

Problem: I can't make HTML tags work in my labels or buttons or... (See How to Use JButton Features for an example.)

Problem: Certain areas of the content pane look weird when they're repainted.

Problem: My program is exhibiting weird symptoms that sometimes seem to be related to timing.

Problem: The scroll bar policies don't seem to be working as advertised.

Problem: My scroll pane has no scroll bars. Problem: The divider in my split pane won't move! Problem: The setDividerLocation method doesn't work. Problem: The borders on nested split panes look too wide. Problem: The buttons in my tool bar are too big. Problem: The components in my layered pane aren't layered correctly. In fact, the layers seem to be inversed--the lower the depth the higher the component.

Problem: The method call colorChooser.setPreviewPanel(null) does not remove the color chooser's preview panel as expected.


Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Copyright 1995-2002 Sun Microsystems, Inc. All rights reserved.