Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我读到这是一个棘手的问题,因为小程序在浏览器中运行。但我希望我的小程序窗口始终保持相同的大小。(现在使用 Eclipse 我可以滑动窗口的大小。)
目前我只这样做:
public class myJApplet extends JApplet{ public void init() { this.setSize(800, 480); } }
有没有办法添加一个this.setResizable(false)?
this.setResizable(false)
在 HTML 中设置小程序的大小。例如
<html> <body> <applet code="myJApplet" width="800" height="480"> </applet> </body> </html>
在 AppletViewer 中加载 HTML 时,applet 仍可调整大小,但这与部署无关。