小程序加载时的进度条

发布于 2024-09-03 01:56:10 字数 131 浏览 1 评论 0原文

好吧,假设我有一个 Java 小程序,需要一段时间才能加载(约 5 秒)。它正在获取 mysql-connector.jar 并且正在加载。好吧..而不是带有咖啡标志的灰色盒子...我可以让它有一个带有百分比的简单进度条吗?

谢谢。

OK so, let's say I have a Java applet that takes a while to load (~5 secs). It's getting the mysql-connector.jar and it's loading. Well.. instead of the gray box with the coffee logo... can I make it have a simple progress bar with the percent?

Thanks.

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

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

发布评论

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

评论(1

执笔绘流年 2024-09-10 01:56:10

如果您需要 mysql 连接器,那么您的应用程序似乎相当复杂,并且您至少应该考虑使用 java webstart。来自常见问题解答:

Java Web Start 与 Java 插件技术(小程序)有何关系?

这两种方法非常相似。主要区别在于用户体验。如果 Java 应用程序/小程序需要与网页交互并紧密绑定到 Web 浏览器,那么小程序可能是解决方案。另一方面,如果浏览器独立性很重要,那么 Java Web Start 就是首选的部署平台。

如果你真的想做进度条,这个页面描述了一个解决方案,但它无论如何都不是微不足道的。

If you need the mysql-connector it seems like your application is fairly complex, and that you should, at least consider, using java webstart. From the faq:

How does Java Web Start relate to Java Plug-in Technology (applets)?

The two approaches are very similar. The key difference is in the user experience. If the Java application/applet needs to interact with a web page and be tightly bound to a web browser, then applets may be the solution. On the other hand, if browser independence is important, then Java Web Start is the deployment platform of choice.

If you really want to do the progress bar, this page describes a solution, but it's not trivial by any mean.

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