是不是初始化的问题?初始化必须放在init()中,而且不能有main方法.
解决方案 »
- 帮我设置下环境变量classpath和Path设置
- JPanel的paint方法
- 求 JAVA2核心技术第2卷 代码
- 请问问题出在哪里?
- 问一个java操作文件的问题。
- 怎么调用自定义的java类?
- 关于SQL Server的JDBC驱动的问题-除了JDBC-ODBC桥之外,还有什么驱动程序能够工作于SQLServer之上?
- 大虾们,我是JAVA菜鸟,请问你们用什么JAVA开发工具???(回答有分)
- Spring+quartz第一次执行问题
- 新手求教接口问题
- 怎样把paint(Graphics g)限定在组件中(比如jPanel)中
- 最後10,請問怎麼得到一個文件(abc.doc)的最後修改日期 ,謝謝
It's important to remember when designing applets that browser support for Java can be limited (depending on the browser you use). If you design your applet using Java AWT components, which are generally supported by most browsers, such as Netscape Navigator and Microsoft Internet Explorer. However, if you want to design an applet using Swing components, you need to determine what Java capabilities your browser supports. Generally, you can find browser support information for Java applets by looking in the Tools, Preferences, or Help menu contents of Netscape or Internet Explorer. The safest way to design your applet is by using AWT components and the JDK that the browser supports.
If you create your applet using javax.swing.JApplet, your applet won't run in most web browsers. At the time of this writing, Swing is not yet supported by the web browsers.愚的理解:
开发javaApplet最好用AWT不要用swing,用swing需要浏览器支持,迄今为止,浏览器都不支持swing组件。所以楼主会遇到这个问题。
建议:多看看java的Tutorial,虽然是英文,但是它包含了很多有用的知识,读完受益菲浅!
不过,awt技术已经逐步淘汰了.
还有好办法吗?