0

I am working in the java swings application and in the application we have the front menu that contain the list of the other button and the drop down menus. in the application we have the various events that are associated to one another and leads to the opening of the various frames. i want to get the list of the parents through which the particular page is open as i am right now using parent-of-parent but that will give me reference to the two level above the hierarchy but not the entire list. please help...

user10101
  • 15
  • 1
  • 7
  • 1
    Can you please post the code what you have tried? – BatScream Nov 12 '14 at 06:05
  • *"the opening of the various frames"* See [The Use of Multiple JFrames, Good/Bad Practice?](http://stackoverflow.com/q/9554636/418556) As to the question, skip the in between components and use [`JComponent.getTopLevelAncestor()`](https://docs.oracle.com/javase/8/docs/api/javax/swing/JComponent.html#getTopLevelAncestor--). Note though, this seems like a 'hack to cover a flawed design'.. – Andrew Thompson Nov 12 '14 at 06:47
  • it is not possible for me to provide the code. – user10101 Nov 12 '14 at 07:19

0 Answers0