public void setBounds(int x,int y,int width,int height)
-----------
x - the new x-coordinate of this component
y - the new y-coordinate of this component
width - the new width of this component
height - the new height of this component
--------
this.指待当前对象。
--------
true?
pack();
this.setVisible(true); //容器可见
--------不要告诉我你看不懂E文。

解决方案 »

  1.   

    this.setBounds(400,400,400,400); 
    //没见过这样设的,呵呵JOptionPane.showMessageDialog(this,"请您输入个整数!"); 
    //this是指父窗口,这里是当前类的实例this.setVisible(true); 
    //使当前窗口可现,这将触发绘屏方法。
      

  2.   

    JOptionPane.showMessageDialog(this,"请您输入个整数!"); 
    //this是JOptionPane,是当前类的实例this.setVisible(true); 
    //使当前窗口可现,这将触发绘屏方法 paint()方法!
      

  3.   

    那就是说楼主的类实例可能是一个Frame类吗?
      

  4.   

    第一个的意思是将“this”这个当前对象(或者说是主窗体,如果我没猜错的话)设置位置和大小四个400分别是:第一个,屏幕的横坐标;第二个,屏幕的纵坐标;第三个,主窗体的长;第四个,主窗体的高
    后一个this,应该都是指的当前的主窗体
    第三个是指把主窗体设置为可以显示,否则你看不到它
      

  5.   

    this指的就是当前object(对象)
    你该把当前的对象说明贴一下
    我比较倾向 cpuzzle(茶壶) 和: gotoidea(索欣) 的意见