麻烦看一下这段程序 是何意思?能帮我解释一下吗? 显示数字按钮?太乱了···眼晕··· 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 排好版再粘出来,昏死掉!! public void ShowNumber(){ repaint(); } public void One(Graphics g){ int[] xPoint=new int[7]; int[] yPoint=new int[7]; int n; n=7; xPoint[0]=x+9*Width/200; yPoint[0]=y+9*Width/200; xPoint[1]=xPoint[0]+9*Width/140; yPoint[1]=yPoint[0]-9*Width/140; xPoint[5]=xPoint[1]; yPoint[5]=yPoint[0]+9*Width/140; xPoint[3]=xPoint[0]+27*Width/70; yPoint[3]=yPoint[0]; xPoint[2]=xPoint[3]-9*Width/140; yPoint[2]=yPoint[3]-9*Width/140; xPoint[4]=xPoint[2]; yPoint[4]=yPoint[3]+9*Width/140; xPoint[6]=xPoint[0]; yPoint[6]=yPoint[0]; g.drawPolygon(xPoint,yPoint,n); g.fillPolygon(xPoint,yPoint,n); }帮忙说一下xPoint[1]=xPoint[0]+9*Width/140; yPoint[1]=yPoint[0]-9*Width/140;这是什么意思? public void setBounds(int x,int y,int width,int height){ Width=height; Length=width; super.setBounds(x,y,width,height); repaint(); } public Dimension getMininumSize(){ return new Dimension(Length,Width); } public Dimension getPreferredSize() { return new Dimension(Length,Width); } private int Length=500; private int Width=40; private int x=Width/20; private int y=Width/20; private String str;这段什么意思?不好意思,谢谢 Java里有关JTree的问题 转义字符"\t" 不生效了,咋回事呢 要下载个东西,没有Javaeye账号,大家帮个忙,散分了 请教一个搜索方面的问题 Java数组比较为什么不行? 字符串的问题 CardLayout问题求助 现在作swing有发展前景吗? 如何建立一个圆形按钮,当单击它时,在右边的PANEL中画出一个圆,并且这个圆可以移动和改变大小? java import 一个程序问题 这里有段程序,能看看给我解释一下吗?谢谢
repaint();
}
public void One(Graphics g){
int[] xPoint=new int[7];
int[] yPoint=new int[7];
int n;
n=7;
xPoint[0]=x+9*Width/200; yPoint[0]=y+9*Width/200;
xPoint[1]=xPoint[0]+9*Width/140; yPoint[1]=yPoint[0]-9*Width/140;
xPoint[5]=xPoint[1]; yPoint[5]=yPoint[0]+9*Width/140;
xPoint[3]=xPoint[0]+27*Width/70; yPoint[3]=yPoint[0];
xPoint[2]=xPoint[3]-9*Width/140; yPoint[2]=yPoint[3]-9*Width/140;
xPoint[4]=xPoint[2]; yPoint[4]=yPoint[3]+9*Width/140;
xPoint[6]=xPoint[0]; yPoint[6]=yPoint[0];
g.drawPolygon(xPoint,yPoint,n);
g.fillPolygon(xPoint,yPoint,n);
}
帮忙说一下xPoint[1]=xPoint[0]+9*Width/140; yPoint[1]=yPoint[0]-9*Width/140;
这是什么意思?
public void setBounds(int x,int y,int width,int height){
Width=height;
Length=width;
super.setBounds(x,y,width,height);
repaint();
}
public Dimension getMininumSize(){
return new Dimension(Length,Width);
}
public Dimension getPreferredSize()
{
return new Dimension(Length,Width);
}
private int Length=500;
private int Width=40;
private int x=Width/20;
private int y=Width/20;
private String str;
这段什么意思?
不好意思,谢谢