Archived

This topic is now archived and is closed to further replies.

salvo

[java] Help wanted - Menus in Applets

Recommended Posts

I have an applet (with no main function) which I want to run with appletviewer or jview (in Windows) and I wan''t to insert a menu. I located a "father" frame to my applet and attached a menubar, menus, menuitems. But I can''t "catch" the events on that frame, since it''s on a higher level than the applet. How can I detect if the user is using the menu?

Share this post


Link to post
Share on other sites
If you aren''t already, use Swing (or the JFC if you prefer). Just upgrade to Java 1.2. Right now, it isn''t supported in either Netscape or IE except through the plug-in, but is supported by mozilla and the Netscape 6 beta. Also, I believe some other web browsers support it. It''s worth it. You can load images without needing the media tracker, and the improvements to the gui is great.

Creating menus like you are doing won''t work on Macs. However, Swing uses lightweight (as in java-created) menus which not only allow you to use menus on applets, it works on every system.

Share this post


Link to post
Share on other sites
What''s wrong with the Media Tracker Squidi, I thought that was a great feature to be able to check on the status of a media source''s load time. Sure as hell is handier than not being able to.

Share this post


Link to post
Share on other sites
Media Tracker doesn''t suck, but it requires more effort to do little things. If I wanted all the extra functionality, it would be great....but I don''t. I just want to load an image.

Image i = new ImageIcons("filename.gif").getImage();

That''s all it takes.

Share this post


Link to post
Share on other sites