please dont rip this site

Language Java Nosugar Graphics ME Code Meselector.java

// 
//	MeSelector class
//	part of the set of documents known as Java no sugar.
//	Copyright (c) 1996,1997 Sunil Gupta, sunil@magnetic.demon.co.uk
//	placed into the public domain by the author
//
import java.applet.*;
import java.awt.*;
import MeCanvas;
import Context;

public class MeSelector extends Applet
{
	//*******************************************************************
	// instance variables
	//*******************************************************************
	Button go_button, stop_button;
	MeCanvas me;
	
	
	//*******************************************************************
	// applet methods
	//*******************************************************************
	public void init()
	{
		Panel controls;
		
		Context.code_base = getCodeBase();
		
		// --------------------------------------
		// create the interface items to display
		// --------------------------------------
		go_button = new Button("Go");
		stop_button = new Button("Stop");
		me = new MeCanvas();
		
		//---add controls to a control panel.-------------
		controls = new Panel();
		controls.setLayout( new GridLayout(2,1));
		controls.add(go_button);
		controls.add(stop_button);
		
		//------------------and now a border layout------------
		this.setLayout(new BorderLayout());
		this.add("West", controls);
		this.add("Center", me);
	}
	
	public boolean action(Event event, Object o)
	{
		if (event.target == go_button)
			 me.start();
		else if (event.target == stop_button)
			me.stop();
			
		return (true);
	}

	public String getAppletInfo()
	{
		return "TEST APP VERSION 2";
	}
	
}


file: /Techref/language/JAVA/nosugar/graphics/me/code/MeSelector.java, 1KB, , updated: 1997/6/1 20:05, local time: 2024/12/28 23:47,
TOP NEW HELP FIND: 
18.223.210.196:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://sxlist.com/techref/language/JAVA/nosugar/graphics/me/code/MeSelector.java"> language JAVA nosugar graphics me code MeSelector</A>

Did you find what you needed?

 

Welcome to sxlist.com!


Site supported by
sales, advertizing,
& kind contributors
just like you!

Please don't rip/copy
(here's why

Copies of the site on CD
are available at minimal cost.
 

Welcome to sxlist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .