I am using JSplitPane to split a Panel into two panes.  I want to
dynamically show/hide these panes on occurence of some  event (say pressing
of some key). But the problem i am facing is that I am not able to find that

when  event occurs focus is on which pane. I mean i am not able to determine
the active pane at the time when that key is pressed. I tried using
FocusListener and MouseListener but it didn't help.. 
I am using following code . Can anyone have any idea on this? 

        setVisible(false);
        setLocation(0,0);
           setSize(600,580);
        JSplitPane
            topSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT),
            bottomSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
        Dimension bottomPaneDim = new Dimension(600,0);
        bottomSplitPane.setMinimumSize(bottomPaneDim);
        topSplitPane.setMinimumSize(bottomPaneDim);

        this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
           this.add(bottomSplitPane);

        setVisible(true);
        topSplitPane.setDividerLocation(200);
        bottomSplitPane.setDividerLocation(400);

Thanks
Sushma
_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing

Reply via email to