eas of the scroll bar control kdtable

// scroll bar automatically hide the display supports three states
public static final int SCROLL_STATE_AUTO = 0; // The data is automatically determined whether to show or hide
public static final int SCROLL_STATE_HIDE=1;//隐藏
public static final int SCROLL_STATE_SHOW = 2; // display    
 
Set the scroll bar state
// sets the vertical scroll bar
table.setScrollStateVertical(KDTStyleConstants.SCROLL_STATE_HIDE);
// set the horizontal scroll bar
table.setscrollStateHorizon(KDTStyleConstants.SCROLL_STATE_HIDE);
 
Replace the scroll bar
// replace the vertical scroll bar
table.getLayoutManager().setVerticalScrollBar(new JScrollBar(JScrollBar.HORIZONTAL));
// replace the horizontal scroll bar
table.getLayoutManager().setHorizonScrollBar(new JScrollBar(JScrollBar.HORIZONTAL));
 

Guess you like

Origin www.cnblogs.com/luojiabao/p/10963927.html
Recommended