Java FX 和数据库连接

发布于 2024-09-14 23:54:39 字数 155 浏览 3 评论 0原文

我想用数据库连接(MYSQL)编写一个JavaFX程序。我不知道如何在程序中创建连接。而且我在互联网上找到的方法对我来说不起作用。 (可能是因为版本差异或其他原因。)任何人都可以提供建立连接并从程序运行查询以获得最新版本的 JavaFX 的过程吗?!

谢谢。

纳伦

I want to write a JavaFX program with Database Connection(MYSQL). I did not know how to create a connection in program. And the methods I found on internet is not working for me. (Possibly because of the version difference or something.) Can anyone give the procedure to establish a connection and run a query from the program for the latest version of JavaFX?!

Thanks.

Naren

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

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

发布评论

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

评论(3

肩上的翅膀 2024-09-21 23:54:39

我还建议看看 DataFX

I would also suggest taking a look at DataFX

八巷 2024-09-21 23:54:39

用户界面不应直接连接到数据库。

在两者之间放置一个 servlet 以充当中介。让它也执行安全、验证、绑定等操作。

你会发现这很难,因为你不应该这样做。

User interfaces should not be connecting directly to a database.

Put a servlet in-between to act as an intermediary. Let it do security, validation, binding, and such, too.

You're finding it hard because you shouldn't.

瑶笙 2024-09-21 23:54:39

你可以在 javamexico.org 中看到我的帖子,其中我谈论了将 mysql 与 java 和 javafx 连接。它是用西班牙语编写的,但只需看看代码即可。
http://javamexico.org/foros/java_enterprise/tratamiento_de_imagenes#comment-3738

You can see my post in javamexico.org, where I talk about connecting mysql with java and javafx. it´s written in spanish but just look at the code.
http://javamexico.org/foros/java_enterprise/tratamiento_de_imagenes#comment-3738

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