• Post Reply Bookmark Topic Watch Topic
  • New Topic

Expand new taskpane, collapse others  RSS feed

 
Sashi kanth
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, i have created 4 taskpanes, using the class org.jdesktop.swingx.JXTaskPane, and added them to a taskpanecontainer.
I added propertychange listeners for all the taskpanes.
There is a method called setCollapsed(true) for the taskpanes.
When i expand a taskpane, i put setCollapsed(true) for other taskpanes, in the propertyChange method, by getting the event source of the taskpanes.

But now when i expand another taskpane, i want to close the previously expanded one, and open this one.
When i use setCollapsed(true) for the previous taskpane, it collapses fine, but at the same time, i want the newly expanded taskpane to show up instantly, instead of again expanding it.
I tried to use setCollapsed(false) but it doesn't work.

How i can achieve this? Any help is appreciated.
 
Sashi kanth
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way of solving this? I have even tried to close all the taskpanes and then expand the clicked one, but that did not work.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!