Need help about JTabbedPane

G

gtcc2009

Hello, I have a problem with the JTabbedPane in which the
PropertyChanged event is only fired if the selected tab is different
from the current tab while the expected behavior is that whenever a tab
is clicked, it is refreshed even if it is the current tab. Is there
anyway to do that without resorting to the MouseClicked event?

Thanks,

Dor
 
Z

zero

(e-mail address removed) wrote in @z14g2000cwz.googlegroups.com:
Hello, I have a problem with the JTabbedPane in which the
PropertyChanged event is only fired if the selected tab is different
from the current tab while the expected behavior is that whenever a tab
is clicked, it is refreshed even if it is the current tab. Is there
anyway to do that without resorting to the MouseClicked event?

Thanks,

Dor

I can't think of any way that would not involve MouseClicked. You could
have a look at the JTabbedPane source and see when and how fireStateChanged
is called in responce to clicking a tab. Then override that method, or
just add your code to fire a ChangeEvent even when the tab isn't changed.

Alternatively, maybe you could add a "refresh" button to the tab's content,
which would be a lot easier to do - but fills up your UI.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top