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.

 Intel Go Parallel Portal
 Internet.com eBook Library
 IBM Software Construction Toolbox
 Microsoft RIA Development Center
 Destination .NET
XML error: not well-formed (invalid token) at line 43
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%.

Remember Figlets? They're Back With Zend
Microsoft Readies an App Store Competitor?
Google: Chrome Browser Will Make Money
Sam Ramji: Microsoft's Man in Open Source
Google to Shake Up Browsers With Own Launch
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

Writing Functional Code with RDFa
BitLocker Brings Encryption to Windows Server 2008
Network Know-How: Exploring Network Algorithms
Create a Durable and Reliable WCF Service with MSMQ 4.0
The Baker's Dozen: 13 Tips for SQL Server 2008 and SSRS 2008
Book Excerpt: Microsoft Expression Blend Unleashed
Develop a Mobile RSS Feed the Easy Way
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

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
Intel PDF: Virtualization Delivers Data Center Efficiency
Intel eBook: Managing the Evolving Data Center
Microsoft Article: BitLocker Brings Encryption to Windows Server 2008
Symantec eBook: The Guide to E-Mail Archiving and Management
Microsoft Article: RODCs Transform Branch Office Security
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
Avaya Article: Advancing the State of the Art in Customer Service
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Avaya Article: Avaya AE Services Provide Rapid Telephony Integration with Facebook
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Seminar: Efficiencies in Hardware/Software Virtualization
HP Webcast: Disaster Recovery Planning
Go Parallel Video: Performance and Threading Tools for Game Developers
HP Video: StorageWorks EVA4400 and Oracle
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
IBM TCO eKIT: Your IT Budget is Under Attack, Get in Control
IBM Energy Efficiency eKIT: Learn How to Reduce Costs
30-Day Trial: SPAMfighter Exchange Module
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
Microsoft Article: Silverlight Streaming--Free Video Hosting for All
Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
HP Demo: StorageWorks EVA4400
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES