显示数字按钮?
太乱了···
眼晕···

解决方案 »

  1.   

    排好版再粘出来,昏死掉!!
      

  2.   

    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;
    这段什么意思?
    不好意思,谢谢