我用MyEclipse8.5编写了如下程序
package bag;
import aLibrary.*;
import java.awt.color.*;
public class Director {
private AWindow theWindow;
private Aoval head,frontSegment,midSegment,rearSegment;
private Aoval leftEye,rightEye,mouth;
private ARetangle frontLeg;
public Director {
theWindow = new AWindow(10,10,500,220);
head = new Aoval(110,70,80,80);
head.place( theWindow );
leftEye = new Aoval(15,30,15,10);
leftEye.setColor(Color.blue);
leftEye.place(head);
rightEye = new Aoval(50,30,15,10);
rightEye.setColor(Color.blue);
rightEye.place(head);
mouth = new Aoval(25,50,30,10);
mouth.setColor(Color.red);
mouth.place(head);
frontSegment = new Aoval(180,100,50,50);
frontSegment.place(theWindow);
frontLeg = new ARetangle(200,150,10,20);
frontLeg.place(theWindow);
midSegment = new Aoval(230,100,50,50);
midSegment.place(theWindow);
rearSegment = new Aoval(280,100,50,50);
rearSegment.place(theWindow);
theWindow.repaint();
}
}
为什么会运行不出来?请大虾们赐教!
------解决方案--------------------
你只给一个Director类什么解决哈
------解决方案--------------------
没有入口啊。
------解决方案--------------------
哥啊,没程序入口,也没输出的,这是要逆天啊
------解决方案--------------------
我的天啊,那是构造方法吗?连括号都没有看到!
连main方法都没有,怎么运行啊?
------解决方案--------------------
一个方法几十个对象放里面,,,,,不报错也会很慢吧