internet.com logo The Java Boutique

 ARTICLES
Tutorials
Reviews
Glossary
 APPLETS
by Category
by Date
by Name
Hall of Fame
Archive
Submit
Source Code
Servlets and JSP
 COMMUNITY
FAQ
Users Poll
Discussion Forum
Contact Us
 OTHER RESOURCES
Custom Applets
Java@Work
Java News
Jini Watch
Affiliate Programs

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

internet.commerce
Partner With Us
Find Software
Imprinted Promotions
Memory Upgrades
Dental Insurance
Shop Online
Boat Donations
Baby Photo Contest
Televisions
Promos and Premiums
Promotional Pens
Corporate Gifts
Online Education
GPS
Phone Cards

WebDeveloper Network
ExtremeFlash
FlashKit
FlashPlanet
Gif.com
JavaBoutique
JavaScript.com
JavaScriptSource
Jobs.Webdeveloper.com
JustSMIL
ScriptSearch
StreamingMediaWorld
VoiceXML Planet
WebDevelopersJournal The WDVL
WebDeveloper.com
WebReference.com
XML101

Web Developer
Opt-in Lists

CGI
HTML
Java
JavaScript
Web Design and Promotion
Web Site Development
E-mail Address:


Can you receive
HTML e-mail?

Yes   No

Zip Code:


 [ Looking for a Site Map? ]

Geodetic2


/* Geodetic2.java
 * Copyright (C) 1996 by William Giel
 *
 * E-mail: rvdi@usa.nai.net
 * WWW: http://www.nai.net/~rvdi/home.htm
 *
 ***************************************************************************
 * Abstract
 * --------
 * This unit creates the initial applet panel and button with which the actual
 * dialogs that perform the calculations, or obtain data, are launched.
 ***************************************************************************
 * Permission to use, copy, modify, and distribute this software and its
 * documentation without fee for NON-COMMERCIAL purposes is hereby granted.
 * 
 * THE AUTHOR MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY
 * OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
 * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
 * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. THE AUTHOR SHALL NOT BE LIABLE
 * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
 * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
 ***************************************************************************/

import java.awt.*;
import java.applet.*;
import java.lang.*;
import java.net.*;

import geoWindow;

public class Geodetic2 extends Applet
{

    geoWindow geoWin;
    Button button;
    Image image=null;
    MediaTracker tracker=new MediaTracker(this);
    int width,height;
    
    public void init()
    {
        URL imageURL=null;
        
	    try{
		        imageURL=new URL(getCodeBase(),gwConst.LOGO);
           } catch (MalformedURLException e)
	                {
    	       		    imageURL=null;
        	    	    image=null;
	                }
		
		
        if(imageURL != null){
       		image=getImage(imageURL);
           	if(image != null)
 	           tracker.addImage(image,0);
	    }
	    
       	setFont(new Font(gwConst.FONTSTRING,Font.BOLD,gwConst.FONTHEIGHT));		        

	 	add (button = new Button(gwConst.BUTTON));
		width=size().width; height=size().height;
        button.move((width-button.size().width)/2,(width-button.size().width)/2);

        geoWin=new geoWindow(this);

        
	}

	public void paint(Graphics g)
	{
		Color color=g.getColor();
		
		g.setColor(Color.lightGray);
		
   		g.fill3DRect(0,0,size().width,size().height,true);

		g.setColor(color);

		if(image != null){
			try{
            	tracker.waitForID(0);
            }catch (InterruptedException e)
            	{
                	return;
                }
              
			g.drawImage(image,(width-image.getWidth(this))/2,button.size().height
				+ (height-image.getHeight(this)-button.size().height)/3,this);

        
        FontMetrics fm=g.getFontMetrics();
        g.drawString(gwConst.COPYRIGHT,(width-fm.stringWidth(gwConst.COPYRIGHT))/2,height-fm.getMaxDescent()-3);
					
				
		}
		
	}

    public boolean action(Event e, Object arg)
    {
		if(arg.equals(gwConst.BUTTON) && null != geoWin)
        {
			if(!geoWin.isShowing())
                geoWin.show();
  			return true;
        }

        
		else return false;  
    }
}

The other source files are available in the .zip file.

Back to Geodetic2 applet page

Browse More Great Applets ...


Applet Index
(sorted alphabetically)

A B C D E F G H I J K
L M N O P Q R S T U
V W X Y Z #s
The Java Source
(applets w/source code)

A B C D E F G H I J K
L M N O P Q R S T U
V W X Y Z




Copyright © 1999 internet.com Corporation
All Rights Reserved. Legal Notices.