please dont rip this site

Language Java Nosugar Custom World Code Framedworldlayout.java

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

public class FramedWorldLayout extends Frame
{
	Button btn_quit;
		
	public FramedWorldLayout( String title, int width, int height)
	{
		WorldLayout layout;
		Button button2;
		Label label1, label2;
		WorldConstraints constraints; 
		
		this.resize(width,height);
		layout = new WorldLayout(width,height);
		this.setLayout(layout);
		
		btn_quit = new Button("Quit");
		constraints = new WorldConstraints(10.0, 10.0);
		layout.setConstraints( btn_quit, constraints);
		this.add(btn_quit);
		
		button2 = new Button("button 2");
		constraints = new WorldConstraints(50.0, 60.0);
		constraints.resizeX = true;
		constraints.resizeY = true;
		layout.setConstraints( button2, constraints);
		this.add(button2);
		
		label2 = new Label("Button2 resizes");
		constraints = new WorldConstraints(50.0, 10.0);
		layout.setConstraints( label2, constraints);
		this.add(label2);
	}			
	
	public boolean action(Event e, Object arg)
	{
		if (e.target ==  btn_quit)
		{
			this.hide();
			this.dispose();
			return(true);
		}
		
		return(false);
	}
}

file: /Techref/language/java/nosugar/custom/world/code/FramedWorldLayout.java, 1KB, , updated: 1996/10/10 11:06, local time: 2024/4/28 22:03,
TOP NEW HELP FIND: 
18.222.107.253: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://www.piclist.com/techref/language/java/nosugar/custom/world/code/FramedWorldLayout.java"> language java nosugar custom world code FramedWorldLayout</A>

Did you find what you needed?

  PICList 2024 contributors:
o List host: MIT, Site host massmind.org, Top posters @none found
- Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
 

Welcome to www.piclist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .