java netbeans 中的 JSpinner 日期/时间格式

发布于 2025-01-07 14:50:49 字数 149 浏览 5 评论 0原文

我想创建一个日期/时间格式为 yyyy/mm/dd hh/mm/ss 的微调器。我有 netbeans,我正在使用它的 GUI 来创建微调器。我可以选择在微调器上显示日期和时间的日期模型,但它不是我想要的格式。

如何使用微调器上的 netbeans GUI 更改格式?

I want to create a spinner that has date/time in the format yyyy/mm/dd hh/mm/ss. I have netbeans and I'm using its GUI to create the spinner. I can select the date model which shows the date and time on the spinner, however its not in the format i want.

How can i change the format using the netbeans GUI on the spinner?

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

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

发布评论

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

评论(1

も星光 2025-01-14 14:50:49

声明以下内容

import java.text.SimpleDateFormat;

public SimpleDateFormat yourDate = new SimpleDateFormat("MM-dd-yyyy");

declare the following

import java.text.SimpleDateFormat;

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