How to add Listener for 'setOneTouchExpandable' of JSplitPane ?
Hi Friends
As I posted this topic under a wrong category, I'm posting it again. I also got one reply, but still I have a problem in adding listener for'OneTouchable' button on divider.
I setsetOneTouchExpandable to true for my JSplitPane by:
splitPane.setOneTouchExpandable(true);
I want to add Listener to that setOneTouchExpandable when user click on that little triangle button of SplitPane's Divider.
I tried this:
BasicSplitPaneDivider divider = ((BasicSplitPaneUI)splitPane.getUI()).getDivider();
divider.addMouseListener(new MouseListener(){
publicvoid mouseClicked(MouseEvent e){}
publicvoid mousePressed(MouseEvent e){}
publicvoid mouseReleased(MouseEvent e){
viewerSize.width = getWidth();
viewerSize.height = getHeight();
fp.setSize(movieScrollPane.getViewport().getWidth(),movieScrollPane.getViewport().getHeight());
fp.validate();
}
publicvoid mouseEntered(MouseEvent e){}
publicvoid mouseExited(MouseEvent e){}
});
But this work only when user drag the divider.It's MouseClick event doesn't work for setOneTouchExpandablebutton which is on splitPan's divider.
So My question is how can I add listener for setOneTouchExpandable when user click on it?
Your any suggestion regarding this topic is valuable for me.
Thanks with hope someone has solution & will reply.
Kirti

