JTextField jtf = new JTextField();
JScrollPane jsp = new JScrollPane(jtf);

解决方案 »

  1.   

    addAdjustmentListenerpublic void addAdjustmentListener(AdjustmentListener l)
    Adds the specified adjustment listener to receive instances of AdjustmentEvent from this scroll bar. If l is null, no exception is thrown and no action is performed.Specified by:addAdjustmentListener in interface Adjustable
    可以加上一个事件监听,然后在这个监听代码里面加上panel的改变事件应该是可以的了
      

  2.   

    你把panel贴到ScrollPane中不就行了码?
      

  3.   

    对呀,用scrollpane不就行了,还是用jbuilder算了,那个东东好呀