vegeta1215
05-02-2005, 10:35 PM
I'm working on a project for my Java class that involves making a program with swing components that lets you draw shapes onto a JPanel. I'm pretty much done, but there is one thing I'm trying to do for the project than I have not been able to figure out how to do.
Basically the app is made of a JFrame with a JMenuBar and a JPanel (which I added to the JFrame). What I'm trying to do is enable/disable menu items items when a certain action happens in JPanel (I extend JPanel and have my own class). I've tried using the getParent method in the JPanel, but I don't think it gives me a reference to the JFrame.
Anyone able to help me out?
Basically the app is made of a JFrame with a JMenuBar and a JPanel (which I added to the JFrame). What I'm trying to do is enable/disable menu items items when a certain action happens in JPanel (I extend JPanel and have my own class). I've tried using the getParent method in the JPanel, but I don't think it gives me a reference to the JFrame.
Anyone able to help me out?