应该是更改sp.setBounds(new Rectangle(int x, int y, int width, int height)),中的width值就可以了.

解决方案 »

  1.   

    _tree.setPreferredSize()
    sp.invalidate()
    sp.validate()
      

  2.   

    要不然你就别用BorderLayout,就用FlowLayout吧
      

  3.   

    to kypfos(大学里没有回忆):用_Tree.setBounds(0, 0, 300, 200);也不行,而且_Tree的width和Height都不知道,我只是让它靠左边,Height应随Frame的大小改变而改变to Leemaasn(怎么又到年底了) :300已经够宽了吧,至少也得变一下的嘛