java圆形画图代码 java绘制圆形代码( 四 )


VIn.close();
repaint();
toolFlag = tempflag;
}
catch(ClassNotFoundException IOe2)
{
repaint();
toolFlag = tempflag;
System.out.println("can not read object");
}
catch(IOException IOe)
{
repaint();
toolFlag = tempflag;
System.out.println("can not read file");
}
}
}
if(e.getSource()==savePic)//保存图画
{
savePicture.setVisible(true);
try{
File fileout = new File(savePicture.getDirectory(),savePicture.getFile());
picOut = new FileOutputStream(fileout);
VOut = new ObjectOutputStream(picOut);
VOut.writeObject(paintInfo);
VOut.close();
}
catch(IOException IOe)
{
System.out.println("can not write object");
}
}
}
}//end paintboard
public class pb
{
public static void main(String args[])
{ new paintboard("画图程序"); }
}
急求Java代码,定义一个Circle(圆类型)public class Exam
{
public static void main(String[] args)
{
Circle c=new Circle(3,4,5);
System.out.printf("圆心:(%f,%f) , 半径:%f,面积:%f",c.x,c.y,c.r,c.countArea());
}
}
class Circle
{
public Circle()
{
this(0,0,0);
}
public Circle(double x,double y,double r)
{
this.x=x;
this.y=y;
this.r=r;
}
public double countArea()
{
return Math.PI*r*r;
}
/*private*/public double x,y,r;
}
java怎么画出一个圆形,我这个为什么画不了呀?YJFrame frame = new YJFrame();
frame.creatUI();
c1 = frame.dedao();
update();
每次都是新建的呀 , 显示了吗
【java圆形画图代码 java绘制圆形代码】关于java圆形画图代码和java绘制圆形代码的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站 。

推荐阅读