我如何添加一个Swing应用程序作为一个整体的Java小程序? [英] how can i add a swing application as a whole in a java applet?

查看:141
本文介绍了我如何添加一个Swing应用程序作为一个整体的Java小程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用的Java Swing一乌尔都语编辑,现在瓦纳添加在applet做一个小工具,将在网上发布,

i have made a urdu editor using swing in java and now wana add it in an applet to make a gadget that will be be available online,

我也读书从Windows字体文件夹的字体的信息,有可能使它的一个小程序?

i am also reading the information of fonts from windows font folder is it possible to make an applet of it?

推荐答案

如果你已经建立了一个Swing应用程序和它的GUI主类是一个JFrame,你基本上就必须从JF​​rame中移动code到A JApplet的。

If you've built a Swing application and its GUI main class is a JFrame, you basically just have to move the code from the JFrame to a JApplet.

有大量的细节大约一个applet是如何从一个应用程序不同,但你会遇到那些和必须以某种方式处理它们。如果你有具体的问题,你总是可以发布更多的问题。

There are lots of details about how an applet is different from an app, but you'll come across those and have to handle them somehow. You can always post more questions if you have specific problems.

有两个问题从Windows字体文件夹阅读的字体。其中之一是,未签名的Applet不允许访问用户的文件系统。你可以找到小程序在这里签署一些更多的信息:的http:// java的。 sun.com/developer/onlineTraining/Programming/JDCBook/signed.html

There are two problems with reading fonts from the Windows font folder. One is that unsigned applets aren't allowed to access the user's file system. You can find some more information on applet signing here: http://java.sun.com/developer/onlineTraining/Programming/JDCBook/signed.html

第二个问题是,你不知道你的applet将在Windows环境下运行。即便如此,你不知道的字体文件夹将是你认为它是。您可能会关闭只是用已知的Java的字体更好。下面是在哪里可以找到他们的一些信息: http://mindprod.com/jgloss/font.html# AVAILABLEJ

The second problem is that you don't know your applet will be running in a Windows environment. Even if so, you don't know the font folder will be where you think it is. You may be better off just using the fonts known to Java. Here's some information on where to find them: http://mindprod.com/jgloss/font.html#AVAILABLEJ.

这篇关于我如何添加一个Swing应用程序作为一个整体的Java小程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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