posted 22 years ago
Hi all,
I am creating an application that consists a split pane in JFrame. Let me call it class A. I create a JTree object that shows all the files in a directory just like a Window Explorere. I have a class that implement TreeSelectionListener, let says class B, that listens to the selected item in the left panel. B will instantiate an object from other class, let say C which displays the content of the selected file in a JPanel. If B wants to add an instance of C into right component of split panel in A, B needs to have access to split pane member of A. My question is, beside let B as an inner class of A so B can see A's split pane, is there another solution to this problem?
Thanks.