Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Creating mouse rollover events on tab selectors in Swing

843805Mar 29 2007 — edited Apr 13 2007
Hi,

I have a jTabbedPane on which I have placed several panels to make tabs.


Here are the two problems.
1.How can I control the background color of the tab selector(where the title of the tab resides) when its tab is selected. I have been able to set dynamically the unselected ones.


2. How can I change the color of the text in the title of the tab when the mouse rollovers the tab selector. When a mouse goes over the selector, the text in the selector needs to change to blue. When the mouse leaves the selector the text color needs to go back to black. I need to capture the event for the selector part only.

I have been able to do it with buttons but how can I do it with tab selectors?

Thanks for your help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 11 2007
Added on Mar 29 2007
5 comments
209 views