有段代码,几个小时前还能正确的编译,可现在再编译时就提示
"cannot access JPanel". 郁闷啊!!!
为了测试一下是不是其他地方错了,我特意写了一个简单的代码:
import java.awt.* ;
import javax.swing.* ;public class JPanelText extends JApplet {
public void init() {
JPanel panel = new JPanel() ;
JButton button = new JButton("button") ;
}
}
在编译时还是会提示"cannot access JPanel",全部的显示如下:
D:\practice\java\swing\JPanelText.java:6: cannot access JPanel
bad class file: D:\practice\java\swing\JPanel.java
file does not contain class JPanel
Please remove or make sure it appears in the correct subdirectory of the classpath.
JPanel panel = new JPanel() ;
^
1 errorProcess completed.其他不带JPanel的程序都能正确通过。
各位支招吧,急等!!!
"cannot access JPanel". 郁闷啊!!!
为了测试一下是不是其他地方错了,我特意写了一个简单的代码:
import java.awt.* ;
import javax.swing.* ;public class JPanelText extends JApplet {
public void init() {
JPanel panel = new JPanel() ;
JButton button = new JButton("button") ;
}
}
在编译时还是会提示"cannot access JPanel",全部的显示如下:
D:\practice\java\swing\JPanelText.java:6: cannot access JPanel
bad class file: D:\practice\java\swing\JPanel.java
file does not contain class JPanel
Please remove or make sure it appears in the correct subdirectory of the classpath.
JPanel panel = new JPanel() ;
^
1 errorProcess completed.其他不带JPanel的程序都能正确通过。
各位支招吧,急等!!!
解决方案 »
- java改变图片亮度
- CGLIB动态代理生成问题
- JDK1.6_10 ArryList 异常问题
- 一个关于String的问题,String数组,String连接
- 如何使用java程序解压多个文件压缩成的.gz文件?急用,在线等,谢谢~~
- 在C盘下编译没问题,在E盘下编译就 error: cannot read是什么原因??
- 能不能这样做?
- java的bug?共同探讨.
- 烂铁:Inner Class的使用?
- 当setLayout(null)的时候,组建应该怎么定位?
- 我用archive作了个图形界面的exe文件关闭后窗口没了,程序还再后台运行?
- ???關於STRUTS MULTIBOX怎麼使用?有誰知道嗎?幫幫忙啦
D:\practice\java\swing\JPanel.java