Switch to full style
Java2 codes,problems ,discussions and solutions are here
Post a reply

Help with JInternalFrame

Thu Oct 23, 2008 1:55 am

Hi all,
I have made a class that extends JInternalFrame. In my main window,
I have a menubar. When the user clicks a menu item (save, for
example), how do I get the currently active window to do that. I can
get the active frame via

JInternalFrame frame = desktop.getSelectedFrame();

But, alas, this does me no good since my class is a descendant of that
and, in the above case, frame.save() doesn't exist. I tried to
typecast it to no avail. I know I am missing something - probably
something simple.

Does the active (focused) window somehow get the menu events? if so,
how would I handle it?



Post a reply