JFrame 定制

发布于 2024-12-29 15:18:11 字数 132 浏览 3 评论 0原文

如何在JFrame的标题栏中添加一些JtextField..?
或者如果我想在 Jframe 的标题栏中添加一些组件
就像 Firefox 中的选项卡一样
(虽然我知道firefox不是完全用java编写的)

How to add some JtextField in title bar of JFrame..?
Or if I want to add some components in Title bar of Jframe
Like there are tabs in Firefox
( although i know firefox is not made up in java competely )

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

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

发布评论

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

评论(2

独享拥抱 2025-01-05 15:18:11

您可以在 JFrame 上调用 setUndecorated(true)。然后您可以实现自己的标题栏,例如 Firefox 或 Chrome 中的选项卡栏。但是您需要注意用于关闭、移动、最小化窗口的小部件。

You can call setUndecorated(true) on JFrames. Then you can implement your own titlebar which can be e.g. a tab bar like in Firefox or Chrome. But you need to take care for widgets for closing, moving, minimizing the window.

噩梦成真你也成魔 2025-01-05 15:18:11

当在“Test”处声明您的 JFrame 时,请输入您想要的 JFrame 标题。

Window = new JFrame("Test");

When declaring your JFrame where I have "Test" put what you want the title of your JFrame to be.

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