Question

I want to disable the second click option of JSplitpane's one touch expandable button.

Is there any property to disable?

Please help me. Thanks in advance.

Edit: I tried the following method using BasicSplitPaneDivider

protected JButton createLeftOneTouchButton() {
    JButton left = super.createLeftOneTouchButton();
    left.setEnabled(true);
    // left.doClick(1);
    // left.setMinimumSize(new Dimension(300,600));
    return left;
}
Was it helpful?

Solution

AFAIK, no, there's no quick & easy way to do this. The buttons are created together in BasicSplitPaneDivider's oneTouchExpandableChanged() method.

You could override this by creating your own implementation of BasicSplitPaneDivider, but then you get into the messy world of playing with the L&F.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top