gpt4 book ai didi

java - 没有 Tab 标题的 JTabbedPane

转载 作者:行者123 更新时间:2023-11-29 07:51:06 25 4
gpt4 key购买 nike

大家好,我正在编写一个应用程序,其中包含 JTabbedPane。但问题是它总是有标签页眉。

enter image description here

我想删除那个选项卡标题并使 JTabbedPane 看起来像一个矩形。

这是我的代码:

public final static JTabbedPane getTabbedPane()
{
JTabbedPane jtp=new JTabbedPane();

jtp.add(new JLabel("Tab"));
jtp.add(new JLabel("Tab"));
jtp.add(new JLabel("Tab"));
jtp.add(new JLabel("Tab"));


return jtp;
}

最佳答案

i want to remove that tab header and make JTabbedPane look like an rectangle one.

  • 不知道你的目标是什么

  • 使用CardLayout

  • JLabel设置LineBorder

关于java - 没有 Tab 标题的 JTabbedPane,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21137932/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com