使用Swing工具包构建Java GUI

时间:2023-01-27 13:22:53

I'm about to start a project where I will be building a road network simulator. The program will in terms of the GUI, be in 2D so basically a top down view of roads with simple moving cars etc.

我即将开始一个项目,我将建立一个道路网络模拟器。该程序将在GUI方面,在2D,所以基本上是一个自上而下的道路与简单的移动车等。

I do have some experience with Swing , and I've used it to build a simulator before but not in the sense of providing an actual animation of moving objects etc. Hence, my question is, do you recommend using swing for such a project, or is there other possibilities which will be more suited for this type of application? I don't know too much about other toolkits, but the main reason I ask is to make sure that swing does not limit me in any way from what I need to achieve.

我确实有一些使用Swing的经验,我之前用它来构建一个模拟器,但不是提供移动物体的实际动画等。因此,我的问题是,你是否建议使用swing来进行这样的项目,还是有其他可能更适合此类应用的可能性?我不太了解其他工具包,但我要问的主要原因是确保摆动不会限制我从我需要实现的任何方面。

2 个解决方案

#1


5  

There's nothing wrong with using Swing for this purpose. There are a number of excellent open source animation API's that will make you're life a lot easier.

为此目的使用Swing没有任何问题。有许多优秀的开源动画API可以让你的生活更轻松。

You'll have evaluate each of these yourself to see which will meet your requirements.

您将自己评估每一项,以确定哪些符合您的要求。

#2


0  

I recommend javafx because oracle will support it.Swing is dead oracle won't make new bug fixes and they will no create more features

我推荐使用javafx,因为oracle会支持它。已经死了,oracle不会修复新的bug,也不会创建更多的功能

#1


5  

There's nothing wrong with using Swing for this purpose. There are a number of excellent open source animation API's that will make you're life a lot easier.

为此目的使用Swing没有任何问题。有许多优秀的开源动画API可以让你的生活更轻松。

You'll have evaluate each of these yourself to see which will meet your requirements.

您将自己评估每一项,以确定哪些符合您的要求。

#2


0  

I recommend javafx because oracle will support it.Swing is dead oracle won't make new bug fixes and they will no create more features

我推荐使用javafx,因为oracle会支持它。已经死了,oracle不会修复新的bug,也不会创建更多的功能