Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

get the selected component

 
Sashi kanth
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, i would like to know, how i can get the selected taskpane, from a set of
taskpanes added to a taskpane container.
Actually i want to get the selected component (taskpane).

Is there is some method of getting the selected taskpane, so that i can
perform an action on it ?
Iam implementing JXTaskPane, and created few taskpanes, added them to
a taskpane container (JXTaskpaneContainer) and inturn added it to a panel.

But i dont know how i can get the selected taskpane, when i expand it.
Please guide me.
 
Michael Dunn
Ranch Hand
Posts: 4632
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sigh!
Thanks Michael.

Sashi,
Please read this
 
Sashi kanth
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, iam surprised to know these new rules to post in the forums. But please let me know, how i can get a solution to my question, which i posted as a new topic.
Iam eager to know the solution, and hence i posted even in the sun forums.
I understand that hijacking an old thread is not good, and hence i posted a new topic.
But iam not sure whether i was right in doing so. Please guide me.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sashi kanth wrote:Hi, iam surprised to know these new rules to post in the forums.

These rules are not new as you call it. I am sure most of the forums have a similar FAQ. So the concept should not be new to you.

Sashi kanth wrote:... which i posted as a new topic.
...and hence i posted even in the sun forums.
I understand that hijacking an old thread is not good, and hence i posted a new topic.

You did not post in a new thread because you understood hijacking was not good. You did indeed hijack an old thread from which I edited your post, requested you to start a new thread, also providing you with a link on why you should do it. I also provided you with a link to the FAQ section. Here is the thread Looks like you did the same in the Sun forum.

If you had bothered to go through the links I had provided, you would have come across the relevant link for cross posting.

Sashi kanth wrote:Please guide me.

Under these circumstances, I fail to understand what else we can do "guide you".
 
Sashi kanth
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, i understand the situation, and sorry for anything that i have done wrong. Please forgive me, and you can also delete my posts if you feel they are not at the right place.
 
Sashi kanth
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sashi kanth wrote: Are there anyone to answer my question? Iam eagerly waiting for any replies.
 
Sashi kanth
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, i got it. We can add PropertyChangeListeners to the taskpanes, like:
taskpane.addPropertyChangeListener(collapsed, this); and the class must be implementing PropertyChangeListener.

Then in propertyChange(PropertyChangeEvent evt) method,
We have to get the event source like: Object src = evt.getSource(); and then we can perform whatever we want, based on the src value. Ex: If src == taskpane1, we can close it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!