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


Partners & Affiliates











advertisement

MenuApplet


MenuApplet How to

This is a short description about how to configure the MenuApplet java applet.

1. What is menu Applet?

This is a navigation pallet applet that can run in a floating window
	or in a frame. It is very useful in big sites because it helps the
	visitor to find a web page without navigating through the site.

2. Files the applet needs to work.

MenuApplet.class
LabelButton.class
MenuApplet.ini - configuration file.

These files must be placed in the same directory.

Other files:

MenuApplet_How_to.html, screen.gif - this documentation.

3. How this applet looks.

You can see two columns.
The first one, labelled "Select" is the column with categories.
The second one, labelled "Go to" contain Links.
Clicking on a category the applet loads its links in the "Go to" menu.
The configuration of the categories is loaded from the MenuApplet.ini file.

4. Installation.

	First you have to write the MenuApplet.ini file. This is a sample:

+Test pages+
\test1\ "test_html/test1.html"
\test2\ "test_html/test2.html"
\test3\ "test_html/test3.html"
\test4\ "test_html/test4.html"
\test5\ "test_html/test5.html"

+Links+
\My page\	"http://www.obs-us.com/people/mihai"
\Real Media\	"http://www.real.com"
\Netscape\	"http://home.netscape.com"
\Yahoo\		"http://www.yahoo.com"
\Altavista\	"http://altavista.com"
\CNN\		"http://cnn.com"

All lines that doesn't start with '+' or '\' character are ignored
A line starting with a '+' means that the following characters
	until the first '+' are the name of a category (select menu).
A line starting with a '\' means that the following characters until the
	first '\' are the name of a link (go to menu). These lines starting
	with '\', must be after a category line. All these lines until the next
	category name or the end of the file are the links for the category.
After a link name, between quotes, it is the e URL of the link. It can be
	a relative URL from the class files, or an absolute URL.
	The absolute one must start with "http://"

Important!
The maximum number of categories or number of links in a category is 20.
	It means that the maximum number of links is 20*20=400.


The applet tag.
This is a sample:

<APPLET CODE=MenuApplet.class WIDTH=260 HEIGHT=150>
	<PARAM NAME=TargetWindow VALUE="LoadHere">
		<!--this parameter can have following values:
			"_blank"
				Display the document in a new window
			"WindowName"
				Display the document in a window
					named windowname
			"_self"
				Display the document in the window (frame)
					that contains the applet
			"_parent"
				Display the document in the parent frame
			"_top"
				Display the document in the top-level frame

		the default value is "_self"
		 -->
</APPLET>

The tag has only one parameter, named TargetWindow.

How to calculate the size of the applet.

HEIGTH=(n+1)*18, where n is the maximum number
	of the categories or links in a category

WIDTH >= 12+(p*7)+(q*7). p is the number of characters in the longest
	category name. q the number of characters in the longest name of a link.

If the WIDTH is larger, the "Go to" section of the applet will be larger.
	The "select" section will preserve its width.

If  the longest name of the categories contains very wide
	characters can be truncated. In this case add one or
	more space characters after its name in the ini file.

If the applet is too narrow for the "go to section",
	just make the WIDTH attribute in the APPLET tag bigger.

How to make the applet to work in a floating window.

You need a little java script that will bring up a window with the applet.
	For example you can place a button in the page:

<FORM>
	<INPUT TYPE="button" NAME="Button1"
		VALUE="Open Menu Window!" onClick="window.open('menu.html',
		'displayWindow', 'menubar=no,height=166,width=244')">
</FORM>

The width and the height of the new window must be about 20
	pixels bigger than the width and the height of the applet.

If the window you want to load the links in doesn't have a name,
	just add in the head section of the HTML file the following code:

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!--
window.name="LoadHere";
//-->
</SCRIPT>
</HEAD>

The TargetWindow parameter in the APPLET tag must be "LoadHere".

If you use the applet in a frame  (not in a floating window)
	or if you want to load the documents in a frame,
	the frame it is already named in the FRAMESET tag.


5. License

Menu Applet 1.0
Copyright (C) 1998  Mihai Munteanu

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

You can contact me at:

* http://www.obs-us.com/people/mihai
* e-mail:  m.munteanu@shef.ac.uk   or   mmm@deltanet.roknet.ro
* Mihai Munteanu
  str. M.Eminescu 44
  2200 Brasov, ROMANIA
* fax: +40 (0)68 410330

Back to the MenuApplet 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.

 Microsoft RIA Development Center
 IBM Rational Resource Center
 Destination .NET
XML error: not well-formed (invalid token) at line 33
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%.

Free VMware Server 2.0 Now Release Candidate
Linux Player Xandros Grabs Storied Rival Linspire
Hey Enterprise: Here Comes the 3G iPhone
MySpace Opens Profile Portability API
Microsoft Jumps Into Virtualization Fray
Eclipse Ganymede Makes It Easier for Devs
Open Source Nokia a Threat to Microsoft, Google?
Salesforce, Google Head for 2nd on Apps
HP Open Sources Unix File System for Linux
Red Hat Opens Its Network to Space

Build a Generic Histogram Generator for SQL Server
Beyond XML and JSON: YAML for Java Developers
Mastering the Windows Mobile Emulators
Avaya AE Services Provide Rapid Telephony Integration with Facebook
Featured Algorithm: Intel Threading Building Blocks: parallel_reduce
Getting Started with Windows Live Admin Center
Eight Key Practices for ASP.NET Deployment
Java ME User Interfaces: Do It with LWUIT!
Talking VPro: Transcript
Bringing Semantic Technology to the Enterprise

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

Solutions
Whitepapers and eBooks
IBM eBook: Planning a Service Oriented Architecture
IBM eBook: Choosing the Right Architecture--What It Means for You and Your Business
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Avaya Article: Using Intelligent Presence to Create Smarter Business Applications
Intel Go Parallel Article: Getting Started with TBB on Windows
Microsoft Article: 7.0, Microsoft's Lucky Version?
Avaya Article: How to Feed Data into the Avaya Event Processor
IBM Article: Developing a Software Policy for Your Organization
Microsoft Article: Managing Virtual Machines with Microsoft System Center
Intel Go Parallel Article: Intel Threading Tools and OpenMP
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
HP Video: StorageWorks EVA4400 and Oracle
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Red Gate Download: SQL Toolbelt and free High-Performance SQL Code eBook
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
Silverlight 2 App and Walkthrough: Leverage Silverlight 2 with SQL Server and XML
IBM Article: Enterprise Search--Do You Know What's Out There?
HP Demo: StorageWorks EVA4400
Microsoft Article: The Progress and Promise of Deep Zoom
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES