开发者

Is it possible to set vertical tabs to have transparent background

I have a tabbed pane setup and set to the left so that the tabs go from top to bottom. unf开发者_运维百科ortunately, the unused space is an ugly gray color. im having trouble setting that to be completely transparent. This combined with the setUndercorated(true) for the parent frame, it should have the effect of hanging over the window. how do i set it to transparent?


I don't think there is a simple way to do what you are asking. You'll probably need to override the way JTabbedPane paints itself. Also, please note that JFrame.setUndecorated(true) has nothing to do with the JTabbedPane. It just means that the JFrame does not contain the window frame (the title bar, and minimize/restore/maximize icons).


That area is non-opaque by default. Set the background of the panel you add the tabbed pane to if you want a different color.

If you have problems then post your SSCCE showing the problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜