How to make JSplitPane
to resizable false
? I didn't want to resize the JSplitPane
, I used it for the border of this pane. Is there any other way to create same border structure to split a panel vertically into two parts.
For preventing users to resize the panes you can also set the divider size to zero.
splitPane.setDividerSize(0);
splitPane.setEnabled( false );
You can override the JSplitPane methodes getDividerLocation()
and getLastDividerLocation
and return a constant value.
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 ;
}
};
Consider for using Compound Borders with EtchedBorder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With