如何JSplitPane调整大小false?我不想调整大小JSplitPane,我用它来做这个窗格的边框.有没有其他方法可以创建相同的边框结构,将面板垂直分成两部分.
cam*_*ckr 25
splitPane.setEnabled( false );
Run Code Online (Sandbox Code Playgroud)
您可以覆盖调整JSplitPane methodes getDividerLocation()和getLastDividerLocation并返回一个恒定值.
JSplitPane split = new JSplitPane(JSplitPane.VERTICAL_SPLIT){
private final int location = 100;
{
setDividerLocation( location );
}
@Override
public int getDividerLocation() {
return location ;
}
@Override
public int getLastDividerLocation() {
return location ;
}
};
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
15291 次 |
| 最近记录: |