private JLabel pwdLabel = new JLabel("Password:");
pwdLabel.setBounds(196, 56, 70, 22);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. 

解决方案 »

  1.   

    object.setSize(int width,int height);改变控件大小
    object.setLocation(int x,int y);设置位置
    定义变量可以在函数开始位置, 初始化 , 运行过程...
      

  2.   

    object.setSize(int width,int height);设置大小
    object.setLocation(int x,int y);设置位置
    变量定义在函数头, 初始化, 运行过程
      

  3.   

    object.setBounds(int x,int y);要先说明object.setLayout(null);
      

  4.   

    难道在layout设置为xylayout后,在自己在界面中改动不是很好吗?jb本身就是可视化编程嘛!
      

  5.   

    其实把Frame的属性设为null或者xyLayout都可以,否则控件的setBounds方法无效
      

  6.   

    定义变量,一般放在Frame上的控件变量是作为全局实例变量存在的,你只要在选中design栏,然后随便撂一个控件在窗体上,转到source栏就可以看到这个控件变量是如何定义的了.另外,jbuilder有时会出现编辑光标与实际字符不符的情况,你可以在tool\editor option\display\font family中设置,只要设为宋体,13就可以解决这个问题,哦,我是用jbuilder6,5应该大同小异吧