• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic


Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am playing around with creating a toolbar and menu for changing the LNF. I'm using toolbar.add(action) and menu.add(action). I want the action to be a non-inner class. The toolbar and menubar work ok and call the action which correctly selects the approriate LNF. My problem is getting a reference to the JFrame. The ActionEvent has a reference to the component that fired of the action. I want to use that reference to get a reference to the parent JFrame. I have been through the SwingUtilities methods
all three throw exceptions.
The only SwingUtilites method that is looking helpful is
This returns an int of 2.
Does anyone know how l can get a reference to the components root container?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic