Hello, I'm working on a project that will require either multiple tabs, or multiple windows (the number will change frequently). The problem with using multiple tabs is closing them. I know that in java se 6 there will be support for using components (such as a close button) in the tabbed pane's title bar, but that is still not officially released yet. So my question is, should I wait for jse 6 and give up on compatibility (from previous releases), or should I not use tabbed panes, or is there some way to add closing functionality to a tabbed pane?
posted 10 years ago
you can add an icon to the tab (perhaps a small X), and a mouseListener to close the tab if the icon is clicked.