Java的:将一个小程序桌面应用程序 [英] Java: Convert an applet to a desktop application

查看:114
本文介绍了Java的:将一个小程序桌面应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,我只看过方式的Java桌面应用程序转换为小程序。有没有办法做反向? (它继承了 java.applet.Applet中的

So far I've only seen ways to convert Java desktop applications to applets. Is there any way to do the reverse? (it inherits from java.applet.Applet)

编辑:我的意思是,以某种方式使一个小程序桌面可执行的JAR文件(Swing或东西)

What I meant was to somehow make an applet a desktop executable JAR file (swing or something).

推荐答案

在没有任何(例如)code很难针点的例子。

Without any (example) code it's difficult to pin point an example.

但是,一般的做法是包含一个单独的包/类的所有应用程序逻辑和GUI code。通过含有像一个JPanel你的基本的用户界面,你可以选择在何处放置它。

However, the general approach is to contain all your application logic and GUI code in a separate package/classes. By containing your basic UI in something like a JPanel, you can chose where to place it.

这不仅意味着你可以切换出来成 JApplet的的JFrame ,也把它作为一部分根据需要复合的UI

This not only means you can switch it out into a JApplet or JFrame, but also include it as part of a compound UI as required

这就是为什么我们建议不添加/直接在顶层容器

This is one of the reason why we suggest not adding/building your UI directly on top of a top level container

这篇关于Java的:将一个小程序桌面应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆