Previous | Next | Trail Map | Creating a GUI with JFC/Swing | 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: [PENDING: should getting started have a problems section?]

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 are all messed up in my nested split panes. 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.

Problem: I'm trying to handle certain events from a component, but the component isn't generating the events it should.

Problem: The document for an editor pane (or text pane) isn't firing document events.


Previous | Next | Trail Map | Creating a GUI with JFC/Swing | Using Swing Components