advertisement
javaboutique
Search Tips
Articles  |   Tutorials  |   Reviews  |   Tools  |   by Category  |   by Date  |   by Name  |   Submit  |   Source  |   Forums  |  
javaboutique
Browse DevX


Partners & Affiliates











advertisement

jvojava


Getting started

To use the Jvo Menu System on your site you should put jms.cab, jms.jar and the images you want to use on your server. That'll make it work with netscape 4+ and MSIE 3+. If you also want it to be viewable in netscape 3 you should unzip jms.jar and put all class files in it on your server too.

To make a popup menu you should create something like this:
<APPLET code="JMSPopupMenu.class" archive="jms.jar" width=80 height=400>
<PARAM name="cabbase" value="jms.cab">
</APPLET>

To add a image flipper you should create something like this:
<APPLET code="JMSImage.class" archive="jms.jar" width=80 height=80>
<PARAM name="cabbase" value="jms.cab">
</APPLET>

This will point netscape to the jms.jar file and MSIE to the jms.cab file. Of course you should enter your own values for the width and the height of the applets.

A simple menu

This is the html code for the applet below:
<APPLET code="JMSPopupMenu.class" archive="jms.jar" width=240 height=40>
<PARAM name="cabbase" value="jms.cab">
<PARAM name="menu0" value="2,1,FFFFFF,menu1.gif">
<PARAM name="names0" value="Previous,Next">
<PARAM name="links0" value="jmstutorial1.html,jmstutorial3.html">
<PARAM name="target" value="tutorial">
</APPLET>

This is the image menu1.gif:
menu1.gif

You can create menus in the PopupMenu applet by using the 'menu' parameter followed by a number. The 'menu0' parameter always is the bottom menu. In the 'menu' parameter you should enter a couple of things seperated by commas. The first two numbers are the number of horizontal and the number of vertical items in the menu. Here the menu is 2 wide and just 1 item high. Next is a hexcolor code for the color of the rectangle to go over the items. Next comes the image to use for the menu and there's also a fifth optional parameter to create transparent menus. More about this later on. You can use the 'names' parameter to add names to the items in the menu. The links are done with the 'links' parameter. There's also a general 'target' parameter to define the target frame.

A more complex menu

This is the html code for the applet below:
<APPLET code="JMSPopupMenu.class" archive="jms.jar" width=320 height=80>
<PARAM name="cabbase" value="jms.cab">
<PARAM name="menu0" value="2,1,FFFFFF,menu2.gif">
<PARAM name="cell0" value="40,20,120,40">
<PARAM name="names0" value="Previous,Next">
<PARAM name="links0" value="jmstutorial2.html,jmstutorial4.html">
<PARAM name="target" value="tutorial">
</APPLET>

This is the image menu2.gif:
menu2.gif

You can also create insets in the menu. This results in a part of the menu which doesn't have any items in it. It's done by using the 'cell' parameter that belongs to the menu you want to change. The first two numbers define the horizontal and vertical inset from the start of the image. The next two numbers define the horizontal and vertical size of a single cell.

This is illustrated by this image:
menu2 explanation

Creating Popups

This is the html code for the applet below:
<APPLET code="JMSPopupMenu.class" archive="jms.jar" width=320 height=80>
<PARAM name="cabbase" value="jms.cab">
<PARAM name="menu0" value="2,1,FFFFFF,menu3.gif">
<PARAM name="cell0" value="40,20,120,40">
<PARAM name="names0" value="Popup 1,Popup 2">
<PARAM name="links0" value="menu1,menu2">
<PARAM name="menu1" value="1,2,003F7F,popup1.gif,popupalpha.gif">
<PARAM name="cell1" value="5,5,70,25">
<PARAM name="names1" value="Previous,Next">
<PARAM name="links1" value="jmstutorial3.html,jmstutorial5.html">
<PARAM name="menu2" value="1,2,003F7F,popup2.gif,popupalpha.gif">
<PARAM name="cell2" value="5,5,70,25">
<PARAM name="names2" value="Previous,Next">
<PARAM name="links2" value="jmstutorial3.html,jmstutorial5.html">
<PARAM name="target" value="tutorial">
</APPLET>

This is the image menu3.gif:
menu3.gif

This is the image popup1.gif:
popup1.gif

This is the image popup2.gif:
popup2.gif

This is the image popupalpha.gif:
popupalpha.gif

Here multiple menus are used to create popups. Just change the links to 'menu' followed by a number to create a "link" to a popup menu. This time the fifth part of the 'menu' parameter is used on menu 1 and 2 to create transparent menus. This last part consist of a second image to be used in the menu. This image defines the transparency of the menu. Fully white means completely visable and black means fully invisable. The images that are used here create a dropshadow effect.

Using image flippers

This is the html code for the left applet below:
<APPLET code="JMSImage.class" archive="jms.jar" width=60 height=60>
<PARAM name="cabbase" value="jms.cab">
<PARAM name="name" value="left">
<PARAM name="image0" value="imageflipdot.gif">
<PARAM name="image1" value="imageflipright.gif">
<PARAM name="event0" value="right.mouse enter,1">
</APPLET>

This is the html code for the right applet below:
<APPLET code="JMSImage.class" archive="jms.jar" width=60 height=60>
<PARAM name="cabbase" value="jms.cab">
<PARAM name="name" value="right">
<PARAM name="image0" value="imageflipdot.gif">
<PARAM name="image1" value="imageflipleft.gif">
<PARAM name="event0" value="left.mouse enter,1">
</APPLET>

This is the image imageflipdot.gif:
imageflipdot.gif

This is the image imageflipright.gif:
imageflipright.gif

This is the image imageflipleft.gif:
imageflipleft.gif

Here two instances of the JMSImage are used. The 'image' parameters are used to load up to 100 images in the applet. 'image0' is always used as the default image. Here the default image is imageflipdot.gif. Next the 'event' parameters can be used to enter up to 100 events, followed by the target image seperated with a comma. A JMSImage produces the events 'mouse enter' and 'mouse exit'. By using the 'name' parameter you can give an applet a name. This allows to catch events from this applet with other applets. The "right.mouse enter,1" in the first applet does the following. Whenever the event 'mouse enter' occurs in the applet named 'right' image number 1, which is imageflipright.gif in this case, will be displayed.

Combining the applets

This is the html code for the left applet below:
<APPLET code="JMSImage.class" archive="jms.jar" width=60 height=60>
<PARAM name="cabbase" value="jms.cab">
<PARAM name="name" value="left">
<PARAM name="image0" value="imageflipdot.gif">
<PARAM name="image1" value="imageflipleft.gif">
<PARAM name="event0" value="menu.mouse enter.previous,1">
</APPLET>

This is the html code for the center applet below:
<APPLET code="JMSPopupMenu.class" archive="jms.jar" width=320 height=80>
<PARAM name="cabbase" value="jms.cab">
<PARAM name="name" value="menu">
<PARAM name="menu0" value="2,1,FFFFFF,menu3.gif">
<PARAM name="cell0" value="40,20,120,40">
<PARAM name="names0" value="Popup 1,Popup 2">
<PARAM name="links0" value="menu1,menu2">
<PARAM name="menu1" value="1,2,003F7F,popup1.gif,popupalpha.gif">
<PARAM name="cell1" value="5,5,70,25">
<PARAM name="names1" value="Previous,Next">
<PARAM name="links1" value="jmstutorial5.html,jmstutorialindex.html">
<PARAM name="menu2" value="1,2,003F7F,popup2.gif,popupalpha.gif">
<PARAM name="cell2" value="5,5,70,25">
<PARAM name="names2" value="Previous,Next">
<PARAM name="links2" value="jmstutorial5.html,jmstutorialindex.html">
<PARAM name="target" value="tutorial">
</APPLET>

This is the html code for the right applet below:
<APPLET code="JMSImage.class" archive="jms.jar" width=60 height=60>
<PARAM name="cabbase" value="jms.cab">
<PARAM name="name" value="right">
<PARAM name="image0" value="imageflipdot.gif">
<PARAM name="image1" value="imageflipright.gif">
<PARAM name="event0" value="menu.mouse enter.next,1">
</APPLET>

Here the JMSPopupMenu applet and the JMSImage applet are combined. The JMSPopupMenu applet can generate a 'mouse exit' event and a 'mouse enter.<itemname>' event. This means that if the mouse cursor comes over an item with the name 'previous', as in this example, the applet will generate the event 'mouse enter.previous'. Whenever this happens in this example, the left applet will respond by changing to image 1. A similar thing goes for the right applet.


Back to the jvojava page

How to Add Java Applets to Your Site

New on the Java Boutique:

New Review:

Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling API boasts simplicity, ease-of-integration, a well-rounded feature set, and it's free!

New Applet:

Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA sequences into three useful formats.

Elsewhere on internet.com:

WebDeveloper Java
Lots of Java information on webdeveloper.com

WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.

ScriptSearch Java
Hundreds of free Java code files to download.

jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.

 Internet.com eBook Library
 IBM Software Construction Toolbox
 Microsoft RIA Development Center
 Destination .NET
XML error: not well-formed (invalid token) at line 38
advertisement
Receive Articles via our XML/RSS feed
Receive Articles via our XML/RSS feed

JavaBytes
Internet Cyclone
This powerful, easy-to-use, internet optimizer is for Windows 95, 98, ME, NT, 2000 and XP. It's designed to automatically optimize your Windows settings, boosting your Internet connection up to 200%.

Mozilla's Ubquity Mashup: For The Masses?
iPhone Users Just Want to Have Fun
Oops! I Fixed the Linux Kernel
Jim Zemlin: The New Center of Linux Gravity
Microsoft's Novell Investment Tops $340M
Fedora 10 Takes Shape
IBM Gives a Mobile Voice to Developers
Inadequate Tools Send Software Down the Drain
USB 3.0 One Step Closer to Reality
Would-Be Linux Contributors May Get a Leg Up

State of the Semantic Web: Know Where to Look
A 3D Exploration of the HTML Canvas Element
Setting Up and Running Subversion and Tortoise SVN with Visual Studio and .NET
Java/JRuby Developers, Say Open 'Sesame' to the Semantic Web
Interpreting Images with MRDS Services
DevXtra Editors' Blog: Executives Avoiding Cloud Computing in Droves
Q&A with James Reinders on the Intel Parallel Studio Beta Program
The Pros and Cons of Outsourcing Enterprise Emails
Hosting Options: Shared or Dedicated Server
Movin' On Up: How to Hop to a New Host

Advertising Info  |   Member Services  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers