please dont rip this site

Language Java Nosugar Custom Progress Code Testprogressbar.java

// 
//	TestProgressBar 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 ProgressBar;

public class TestProgressBar extends Applet
{
	ProgressBar bar1,bar2,bar3,bar4;
	Button btn_up, btn_down;
	
	public void init()
	{
		bar1 = new ProgressBar(ProgressBar.HORIZONTAL);
		bar2 = new ProgressBar(ProgressBar.VERTICAL);
		bar3 = new ProgressBar(ProgressBar.HORIZONTAL, ProgressBar.SLATTED);
		bar4 = new ProgressBar(ProgressBar.VERTICAL, ProgressBar.SLATTED);
		
		bar1.randomize();
		bar2.randomize();
		bar3.randomize();
		bar4.randomize();
		
		this.add(bar1);
		this.add(bar2);
		this.add(bar3);
		this.add(bar4);

		btn_up = new Button("+");
		btn_down = new Button("-");
		this.add(btn_up);
		this.add(btn_down);
	}
	
	public boolean action( Event e, Object arg)
	{
		if (e.target == btn_up)
		{
			bar1.increment();
			bar2.increment();
			bar3.increment();
			bar4.increment();
			return true;
		}
		else if (e.target == btn_down)
		{
			bar1.decrement();
			bar2.decrement();
			bar3.decrement();
			bar4.decrement();
			return true;
		}
		
		return false;
	}
}

file: /Techref/language/java/nosugar/custom/progress/code/TestProgressBar.java, 1KB, , updated: 1997/1/22 19:28, local time: 2024/12/27 23:32,
TOP NEW HELP FIND: 
18.227.13.119: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/custom/progress/code/TestProgressBar.java"> language java nosugar custom progress code TestProgressBar</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!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .