简体   繁体   中英

Adding a 'Minimize' button to JTabbedPane Tab Bar

I've searched extensively to solutions for this but haven't found anything that really achieves what I'm trying to do, the closest thing I could find was the solution posted at the bottom of this thread: http://www.java-forums.org/awt-swing/12267-how-add-jbutton-tabbed-pane-headder.html .

However because the JTabbedPane I'm using is inside a JSplitPane, it's size can increase/decrease, so using that solution doesn't work as the button stays static.

Below is an image of where I would like the place the component, similar to how eclipse has a minimize button on it's pop out views.

在此处输入图片说明

Is this possible without creating a custom JTabbedPane component?

Do you really need this button to hide?

Why don't you set splitpane.setOneTouchExpandable(true); ?

With this line you can hide the bottom with an arrow of the splitpane.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM