swing:保存对话框调整尺寸

发布于 2024-08-01 17:54:54 字数 162 浏览 2 评论 0原文

我有一个对话框,其中包含用户可以通过移动/拖动来更改的一系列尺寸,其中包括具有可调整大小/可拖动列的 JTable。

我想做的是使这些可调整大小的列/对话框/等的状态保持不变,这样下次我的应用程序启动时,用户就不必再次执行调整大小的步骤。

执行此操作最方便的方法是什么?

I have a dialog box with a bunch of dimensions that a user can change by moving/dragging, including a JTable with resizable/draggable columns.

What I would like to do is to make the state of these resizable columns / dialog boxes / etc. persistent, so the next time my application starts up, the user doesn't have to go through the resizing step all over again.

What's the most convenient way to do this?

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

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

发布评论

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

评论(1

彩扇题诗 2024-08-08 17:54:54

您可能应该看一下(现在可能已经死了)JSR-296 中的代码。 其中一部分专注于持久会话状态,我确信用于持久窗口位置等的代码已经可以运行并且在基本框架中。 它应该要么已经完成您想要的操作,要么提供一个良好的起点。

比照。 JSR-296 的 dev.java.net 站点

You should probably take a look at the code in (the now probably dead) JSR-296. A part of it was focused on persistent session state, and I know for sure that the code for persisting window locations and such was already functional and in the basic framework. It should either already do what you want, or provide a good starting point.

Cfr. dev.java.net site for JSR-296

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