java Swing 应用程序在哪里使用?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/407343/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where are Swing applications used?
提问by arshad
Are Swing applications really used nowadays? I don't find a place where they are used. Is it okay to skip the AWT and Swing package (I learned a bit of the basics though)?
现在真的使用 Swing 应用程序吗?我没有找到使用它们的地方。可以跳过 AWT 和 Swing 包吗(虽然我学到了一些基础知识)?
回答by Bill K
If you are writing for the web exclusively, you can probably skip Swing, but otherwise you're absolutely going to run into it. I've never worked on a non-trivial Java app without a Swing GUI.
如果您专门为 Web 编写代码,您可能可以跳过 Swing,否则您绝对会遇到它。我从来没有在没有 Swing GUI 的情况下开发过非平凡的 Java 应用程序。
Also, Swing is one of the better APIs to use. If you use most others, you are going to find them more difficult to use and/or platform incompatible. (If anyone reading this is aware of exceptions to this, please leave comments, I haven't looked for a while and am kind of curious if anything better has become available)
此外,Swing 是更好用的 API 之一。如果您使用大多数其他产品,您会发现它们更难使用和/或平台不兼容。(如果阅读本文的任何人都知道例外情况,请发表评论,我已经有一段时间没有寻找了,如果有更好的东西可用,我有点好奇)
Other JVM languages like JRuby and Jython are often used because of their access to Swing.
其他 JVM 语言(如 JRuby 和 Jython)经常被使用,因为它们可以访问 Swing。
回答by user51478
You may checkout Swing Sightings.
您可以查看Swing Sightings。
This website is hosted by SUN and it is dedicated to sw projects that use Swing. There are a lot of projects using Swing ...
本网站由 SUN 主办,专供使用 Swing 的 sw 项目。有很多项目使用 Swing ...
回答by Brian Knoblauch
Swing is heavily used in business specific (vertical)/internal application development.
Swing 大量用于特定于业务的(垂直)/内部应用程序开发。
回答by Eldelshell
Hmmmm... how about NetBeans? You know, the IDE? It uses Swing.
嗯……NetBeans 怎么样?你知道,IDE?它使用 Swing。
回答by David Koelle
Swing applications are used in most cases where a Java app runs on the desktop. Sometimes you don't even know - for example, LimeWire is a Java Swing application.
Swing 应用程序用于 Java 应用程序在桌面上运行的大多数情况。有时您甚至不知道 - 例如,LimeWire 是一个 Java Swing 应用程序。
When learning Swing, you'll find that you will come to know those parts of AWT that are still important, such as Event, LayoutManager, Graphics, Font, Color, etc.
在学习 Swing 的时候,你会发现你会开始了解 AWT 中那些仍然很重要的部分,比如 Event、LayoutManager、Graphics、Font、Color 等。
回答by duffymo
You should certainly write Swing for desktop Java, only using AWT to the degree that Swing demands it.
您当然应该为桌面 Java 编写 Swing,仅在 Swing 要求的程度上使用 AWT。
I'm sure people can come up with examples of very good Swing apps besides SQL Squirrel and IntelliJ.
我相信除了 SQL Squirrel 和 IntelliJ 之外,人们还可以想出非常好的 Swing 应用程序的示例。
I think that RIA technologies like Flex, Silverlight, etc. are ascendant because the web and services are taking mindshare from desktops. It's not just Swing that's losing out.
我认为像 Flex、Silverlight 等 RIA 技术正在崛起,因为 Web 和服务正在从桌面获取思想共享。失败的不仅仅是 Swing。
回答by Yoni Roit
Whenever you want to write a desktop GUI app for non-Windows OS, you use Swing as the only sane and guaranteed cross-platform GUI framework.
每当您想为非 Windows 操作系统编写桌面 GUI 应用程序时,您都可以使用 Swing 作为唯一合理且有保证的跨平台 GUI 框架。
Besides, Swing has a very good design. I recommend to learn it anyways, to make yourself a better programmer.
此外,Swing 的设计非常好。我建议无论如何都要学习它,让自己成为一个更好的程序员。
回答by Martin OConnor
Check out Filthy Rich Clients. It explains some of the history of AWT and Swing. Swing, being a lightweight alternative (successor) to most of the AWT classes.
查看肮脏的富客户。它解释了 AWT 和 Swing 的一些历史。Swing 是大多数 AWT 类的轻量级替代品(继承者)。
回答by PhiLho
Skip AWT and Swing? To jump where? SWT? Web-based development?
跳过 AWT 和 Swing?往哪里跳?斯威特?基于网络的开发?
In the broader sense, I have a number of Java applications, although I am not too sure if they use Swing or SWT.
从更广泛的意义上讲,我有许多 Java 应用程序,尽管我不太确定它们是使用 Swing 还是 SWT。
- Lot of database tools like SQuirreL SQL Client are written in Java. I think SQuirrel uses stuff from Netbean, which is, of course, Swing based.
- yEd is written in Java, probably Swing.
- A number of P2P softwares are written in Java, including Frostwire (I see no trace of SWT there, but I can just miss it).
- 许多数据库工具如 SQuirreL SQL Client 都是用 Java 编写的。我认为 SQuirrel 使用来自 Netbean 的东西,当然,它是基于 Swing 的。
- yEd 是用 Java 编写的,可能是 Swing。
- 许多 P2P 软件是用 Java 编写的,包括 Frostwire(我在那里看不到 SWT 的踪迹,但我只是想念它)。
And this list is far from exhaustive!
这份清单远非详尽无遗!
Lol! I forgot to mention the software suite made by the company I work for! It is quite specialized, used by mobile phone companies to monitor health of their network nodes (superficially looks like a spreadsheet). Totally Swing based.
哈哈!我忘了提到我工作的公司制作的软件套件!它非常专业,被移动电话公司用来监控其网络节点的健康状况(表面上看起来像一个电子表格)。完全基于 Swing。

