可配置的 jframe 元素
我已经使用 Swing JFrame 构建了一个数字时钟,目前时钟是实时的,但它始终会显示一组时区。我可以配置时区吗?
我想设置时区、标签名称、显示/隐藏时钟。 这些可以在可执行jar中吗?
I have build a digital clock using Swing JFrame, for now the clock is live but it will always show a set of timezone. Is that possible for me to configure the timezone?
I want to set the timezone, name of the label, show/hide the clock.
Is these are possible in executable jar?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
作为一个可配置的应用程序,我们有两个选项
如果它是一个小型应用程序,那么选择数据库完全是浪费时间和内存。我们可以通过写入/读取文件来实现相同的目的。
同样,如果我们将configuration.properties 或参考文件与可运行的jar 一起打包。它将失败,因为jar 中的所有文件都是只读的,我们无法写入其中。
所以唯一的可能就是
Being a configurable application we have two options
If it's a small application then choosing a database is completely waste of time and memory. We can achieve the same via writing/reading the file.
Again, if we are packing the configuration.properties or reference file along with our runnable jar. It will fail because all the files within jar are read only, we cannot write into it.
So the only possibility is to