“形状 = getShape();” 被识别为错误,找不到符号
JDK 1.6 网络豆 7.0.1
代码如下;(试图这样做http://www.youtube.com/watch?v=IFIlr6cpX64)
import com.sun.awt.AWTUtilities;
import java.awt.Shape;
import java.awt.geom.Ellipse2D;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.WindowConstants;
public class Wickget extends JFrame{
public Wickget(){
setUndecorated(true);
setSize(500,500);
add(new JLabel(new ImageIcon("index.jpg")));
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
setVisible(true);
Shape shape= new Ellipse2D.Float(0,0,500,500);
shape = getShape();
AWTUtilities.setWindowShape(this, shape);
}
public static void main(String[] args){
new Wickget();
}
}
“形状 = getShape();” 被识别为错误,找不到符号
JDK 1.6 网络豆 7.0.1