当我尝试在BlueJ中使用类CanvasPane时,它会抛出一个编译错误,说"找不到符号 - 类CanvasPane"即使我添加这些导入:
import javax.swing.*;
import java.awt.*;
可能是什么问题?
答案 0 :(得分:0)
以下套餐不包含CanvasPane
import javax.swing.*;
import java.awt.*;
选中此URL,CanvasPane
是BlueJ.java
中的私有内部类,您无法导入它。否则,您可以定义自己的canvasPane
并将其嵌入到您的 public class MyClass{
private CanvasPane myCanvasPane;
public class CanvasPane extends JPanel
{
public void paint(Graphics g)
{
g.drawImage(canvasImage, 0, 0, null);
}
}
}
中类:
Attempt to unlock a mutex which is locked by another thread