0

I have a strange behavior happening with a JXTaskPane added to a JPanel.

The JXTaskPane has lists of multiple (expandable) sections of icons and then it is added to JXTaskPaneContainer.

The taskPaneContainer is then added to the JPanel.

This JPanel is added to a JTabbedPane.

When the program starts and that (2nd) tab is setSelectedComponent, that TaskPane with the list of icon sections (inside the container) flashes briefly expanded (with scroll bar) before it displays collapsed. Its nuissance behavior that I am trying to eliminate.

Why does it show expanded briefly before it displays to its set collapsed state?

Brandon
  • 16,382
  • 12
  • 55
  • 88
user691305
  • 1,560
  • 2
  • 9
  • 12

1 Answers1

0

I am experiencing the same thing with a JXTaskPane. I have looked at the source code of swingx and saw that the JXTaskPane uses a JXColapsiblePane internally wich is expanded by default.

When you call setColapsed(true) as you create your JXTaskPane, it fires a propertyChange event that will be processed the first time the component is displayed, this explains the strange behaviour we see here.

jumar
  • 5,360
  • 8
  • 46
  • 42