JSplitPane.setDividerLocation(double d)

JSplitPane.setDividerLocation(double d)
该函数必须在frame.setVisible(true) 之后使用才有用。
下面是官方帮助
Sets   the   divider   location   as   a   percentage   of   the   JSplitPane's   size.  
This   method   is   implemented   in   terms   of   setDividerLocation(int).   This   method   immediately   changes   the   size   of   the   split   pane   based   on   its   current   size.   If   the   split   pane   is   not   correctly   realized   and   on   screen,   this   method   will   have   no   effect   (new   divider   location   will   become   (current   size   *   proportionalLocation)   which   is   0)

你可能感兴趣的:(JSplitPane.setDividerLocation(double d))