Total members 11892 |It is currently Fri Sep 20, 2024 4:52 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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?




Author:
Proficient
User avatar Posts: 280
Have thanks: 1 time
Post new topic Reply to topic  [ 1 post ] 










Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com