小程序和 SWING 之间有什么区别?
小程序和 SWING 之间有什么区别?
What is the difference between applets and SWING?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
小程序和 SWING 之间有什么区别?
What is the difference between applets and SWING?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(7)
请参阅Applet
请参阅Swing (Java)
See Applets
See Swing (Java)
小程序是通常在网络浏览器 Java 插件中运行的小程序。
秋千是一种游乐场设备,通常由用两条链条或绳索悬挂的座椅组成。非常有趣。 :)
不过,严肃地说,Swing 是一个 Java GUI 库。它提供了按钮和文本字段等组件。您可以在小程序中使用 Swing 组件。
An applet is a small program that often runs in a web browser Java plugin.
A swing is a piece of playground equipment usually consisting of a seat suspended by two chains or ropes. It's quite fun. :)
In all seriousness, though, Swing is a Java GUI library. It provides components such as buttons and text fields. You can use Swing components in an applet.
Applet 将在客户端 Web 浏览器中下载并在本地执行,其中 swing 具有一组用于开发 GUI 组件的 API,并且可以充当独立的应用程序。
Applets will be downloaded at the client web browser and executed locally where as swing has a set of APIs for developing GUI components and can act as stand alone applications.
简短回答:
Applet
旨在成为在网络浏览器中运行并按需下载的小功能。Swing
是用户界面组件的集合,例如文本框和窗口,旨在由开发人员组装以在桌面上使用。长答案:参见 adamantium 的答案。
Short answer:
Applets
are intended to be small bits of functionality run in a web browser and downloaded on-demand.Swing
is a collection of user interface components, like text boxes and windows, that are meant to be assembled by a developer for use on the desktop.Long answer: See adamantium's answer.
我认为令人困惑的是您在构建小程序时最初遇到的所有术语。
Applet
是在 Web 浏览器的 Java 沙箱中运行的程序的总称。它也是一个特定的 Java 类 (java.applet.小程序)。该程序的入口类必须继承Applet。Applet 最初(Java 1.1 版之前)只能使用 AWT 用户界面组件。
从 Java 版本 1.3 开始,可以改用 Swing 组件。在这种情况下,您的入口类必须扩展 JApplet。
I think the confusion is with all the terminology you initially encounter when building applets.
Applet
is the overall name for a programme that runs in a Java sandbox in a web browser. It is also a specific Java class (java.applet.Applet). The entry class of this programme must extend Applet.Applets originally (upto Java version 1.1) could only use AWT user interface components.
Since Java version 1.3 Swing components may be used instead. In this case your entry class must extend JApplet.
摇摆 :-
Swing是轻量级组件。
Swing 有它自己的布局,就像最流行的盒子布局一样。
Swing 有一些线程规则。
Applet :-
Applet 是重量级组件。
Applet 使用类似 flowlayout 的 AWT 布局。
Applet 没有任何规则。
Swing :-
Swing is light weight component .
Swing have it's own layout like most popular box layout.
Swing have some thread rules.
Applet :-
Applet is heavy weight component.
Applet uses AWT layout like flowlayout.
Applet doesn't have any rules.
Swing 是轻量级组件。
Applet 是重量级组件。
Swing 具有根据用户视图的外观和感觉,您可以使用 UIManager 更改外观和感觉。
Applet 不提供此功能。
Swing 用于独立应用程序,Swing 有 main 方法来执行程序。
Applet 需要 HTML 代码来运行 Applet。
Swing 使用 MVC 模型视图控制器。
Applet 没有。
Swing 有自己的布局,就像最流行的 Box 布局一样。
Applet 使用 AWT 布局(如 flowlayout)。
Swing 有一些线程规则。
Applet 没有任何规则。
Swing:-执行 Swing 不需要任何浏览器,我们可以通过它创建独立的应用程序,但是在这里我们必须添加容器并在框架容器中维护所有操作控制。
Applet:要执行Applet程序,我们需要任何浏览器,例如AppletViewer(Web浏览器)。因为Applet是使用浏览器容器来运行的,所有的动作控制都是在浏览器容器中进行的。
Swing is light weight Component.
Applet is heavy weight Component.
Swing have look and feel according to user view you can change look and feel using UIManager.
Applet Does not provide this facility.
Swing uses for stand lone Applications, Swing have main method to execute the program.
Applet need HTML code for Run the Applet.
Swing uses MVC Model view Controller.
Applet not.
Swing have its own Layout like most popular Box Layout.
Applet uses AWT Layouts like flowlayout.
Swing have some Thread rules.
Applet doesn't have any rule.
Swing:-To execute Swing no need any browser By which we can create stand alone application But Here we have to add container and maintain all action control with in frame container.
Applet: to execute Applet program we should need any browser like AppletViewer, a web browser. Because Applet is using browser container to run and all action control with in browser container.