//
import java.awt.*; public class TestSlider1 extends BufferedApplet { Slider slider; int w = 0, h = 0; public void render(Graphics g) { if (w == 0) { w = bounds().width; h = bounds().height; slider = new Slider(100,100,100,15); slider.label = "my first slider"; } g.setColor(Color.white); g.fillRect(0,0,w,h); slider.render(g); } public boolean mouseDown(Event e, int x, int y) { slider.down(x, y); damage = true; return true; } public boolean mouseDrag(Event e, int x, int y) { slider.drag(x, y); damage = true; return true; } public boolean mouseUp(Event e, int x, int y) { slider.up(x, y); damage = true; return true; } }