Swing 工具栏放置

发布于 2024-08-11 03:19:39 字数 108 浏览 2 评论 0原文

我想在分割窗格的右侧显示一个 JToolbar,它也将包含一个 JTabbedPane,我们该怎么做?将 TabbedPane 和工具栏包装在某个组件中? ps:用户不应该能够在右侧窗格中最小化等...

I want to display a JToolbar within right side of a split pane, which is also going to contain a JTabbedPane, how can we do that ? wrap TabbedPane and toolbar in some component? ps: user should not be able to minimize, etc in right side pane...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不如归去 2024-08-18 03:19:39

将 JPanel 放在分割窗格的右侧。

给 JPanel 一个 BorderLayout。

将 JToolbar 添加到 JPanel 的北边,将 JTabbedPane 添加到 CENTER。

Put a JPanel on the right side of the split pane.

Give the JPanel a BorderLayout.

Add the JToolbar to the NORTH of the JPanel, and the JTabbedPane to the CENTER.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文