★ wanayoo — archive 1999 http://javaboutique.webdeveloper.com/Geodetic2/source.htmlNouvelle recherche | Portail wanayoo
internet.com logo The Java Boutique

 APPLETS
by Category
by Date
by Name
Hall of Fame
Archive
Submit
Source Code
Servlets and JSP
 ARTICLES
Tutorials
Reviews
Glossary
 FORUM
FAQ
Users Poll
Discussion Group
Contact Us
 OTHER RESOURCES
Custom Applets
Java@Work
Java News
Jini Watch
Affiliate Programs
Top Searches
chat - counter
menu - countdown

internet.com
Internet News
Internet Stocks/VC
Internet Technology
Windows Internet Tech.
Linux/Open Source
Web Developer
ECommerce/Marketing
ISP Resources
ASP Resources
Wireless Internet
Downloads
Internet Resources
Internet Lists
International

Search internet.com
Advertising Info
Corporate Info

internet.commerce
Be a Commerce Partner
Internet Jobs
Survey your eMarket
PDA Time Tracking
News to Your Desktop
Small Biz Purchasing
Content for Websites
IT Products and Svcs
Barter Service
Buy Linux Products
Shopping Cart

WebDeveloper Network
BrowserWatch
Developer Forums
Developer News
JavaBoutique
JavaScriptSource
ScriptSearch
SearchEngineWatch
StreamingMediaWorld
The WDVL
WebDeveloper.com
WebDevelopersJournal WebReference.com
The XML Files
 [ Looking for a Site Map? ]

Jobs.webdeveloper.com

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.