Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Massimo Zappino
Added: Mar 7, 2018 9:42 PM
Modified: Mar 7, 2018 9:47 PM
Views: 59
  1. int left = 0;
  2. int right = 1;
  3. JSplitPane split = new JSplitPane();
  4. split.setOneTouchExpandable(true);
  5. BasicSplitPaneUI ui = (BasicSplitPaneUI) split.getUI();
  6. JButton oneClick = (JButton) ui.getDivider().getComponent(left);
  7. oneClick.doClick();