JDK-6632934 : JTabbedPane with closable tabs
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u3
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-11-21
  • Updated: 2010-04-26
  • Resolved: 2007-11-22
Related Reports
Duplicate :  
Description
Almost all new applications with tab views (whether Firefox, IE 7, or
Eclipse) provide a close button on each tab itself for easy closing of tabs. 
Achieving this behavior is quite difficult with the current Java JTabbedPane.

The only way we have been able to do it is the "JTabbedPaneWithCloseIcons" implementation found here:

http://forum.java.sun.com/thread.jspa?threadID=337070

 

However this has the downside that we have to extend from BasicTabbedPaneUI, 
which means that any L&F's TabbedPaneUIs are overridden by our own (customized) 
BasicTabbedPaneUI. Also there is no other icon on the tab.


Our request would be to add to the JTabbedPane implementation by allowing for 
close buttons on either side of the tab.

Comments
EVALUATION For more information, please see http://weblogs.java.net/blog/alexfromsun/archive/2005/11/tabcomponents_i_1.html
22-11-2007