So I just stumbled across placement of tabs in a JTabbedPane to the right and left (i.e. setTabPlacement(JTabbedPane.RIGHT)
) which I love the look of. What I need is to utilize the space this leaves beneath the tabs. I currently have a column of JButtons, but they get pushed to the side, leaving a lot of blank space.
Any thoughts on how to do this? Some kind of custom overlay or something?
Here's a screenshot. In the code I basically have one horizontally aligned Box, with the JTabbedPane over a JTree, then the column of buttons after that.
boxOfEverything.add(tabbedPane);
boxOfEverything.add(boxColumnButtons);
I made this community wiki because this answer is not mine. @cheesecamera seems to have posted the same question on another forum and got an answer there. I copied the answer so that people coming here looking for an answer can get an answer.
The idea is to use swing's
glasspane
.