JDK-4620537 : MouseListener on JTabbedPane with SCROLL_TAB_LAYOUT policy doesn't get events.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2002-01-08
  • Updated: 2002-01-08
  • Resolved: 2002-01-08
Related Reports
Duplicate :  
Description
On jdk1.4.
Add mouse listener on JTabbedPane.
Set SCROLL_TAB_LAYOUT policy to the JTabbedPane.

Then when user clicks on tabs of that tabbed pane. There are no mouse events propagated to the mouse listener. 
The problem is, for drawing the scroll tab layout the tabbed pane UI uses internal components thus, breaking the contract.

I guess the events have to be propagated to the JTabbedPane listeners just like  when WRAP_TAB_LAYOUT policy is set, it shouldn't matter which method for drawing the component is used.

Comments
EVALUATION When scroll layout is used a tab scroller is added to the tabbed pane. Mouse events go to it and not the tabbed pane. The tab scroller is private so you can't get to it easliy without digging for it. This problem has already been addressed and will be fixed in RFE 4499556. Closing this bug as a duplicate. ###@###.### 2002-01-08
08-01-2002