JBuilder8 制作Applet 小应用程序

来源:百度知道 编辑:UC知道 时间:2024/05/03 01:42:40
一个完好的用JBuilder8 做的Applet 代码,我只是想改变几个控件的位置大小,为什么无论我如何变动,html浏览的APPLET 没有边呢?HTML调用代码:
<applet id="Applet1" height="762" hspace="0" width="762" align="middle" code="GisMap.GisMapApplet.class" codebase="." archive="GisMap.jar" vspace="0" name="TestApplet" MAYSCRIPT>

每次Run Project html显示的applet一点都没改变.我刚接触JAVA ,可能对JBuilder 使用还不了解,请各位朋友帮帮忙,非常感谢

可以在源文件中例如

面板设置为
JPanel p=new JPanel();
p.setLayout(null);
例如添加按钮JButton b=new JButton();
p.add(b);
b.setBounds(10,20,30,40);
其中10为组件相对于面板的x坐标,20为y坐标,30,40 为组件的宽和高。
组件位置和html设置关系很小,只是显示的applet整体大小和位置。