把它的最小、最大和最合适大小设置成一样!setmax..、setmin...、setper...  呵呵 :)

解决方案 »

  1.   

    应该可以用button.setSize(,)来确定
      

  2.   

    trypublic void setBounds(int x,
                          int y,
                          int width,
                          int height);button has this method from java.awt.Component
      

  3.   

    用jbuilder做,再将layout设为xylayout
    自己拖动大小。
      

  4.   

    先把JButton设定大小,然后就是布局管理器再将layout设为xylayout,如 newman0708(春华) 所说。否则它会随着父容器的变化而变化。