import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class ScrollBar here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class ScrollBar01 extends Actor
{
/**
* Act - do whatever the ScrollBar wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
drawScrollBar01();
}
public void drawScrollBar01()
{
GreenfootImage image = new GreenfootImage(900, 40);
image.setColor(Color.WHITE);
image.fillRect(0, 0, 880, 38);
//image.drawRect(0, 0, 880, 38);
setImage(image);
}
}
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class ScrollBar02 here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class ScrollBar02 extends Actor
{
/**
* Act - do whatever the ScrollBar02 wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
drawScrollBar02();
}
public void drawScrollBar02()
{
GreenfootImage img = new GreenfootImage(200, 30);
img.setColor(Color.GRAY);
img.fillRect(0, 0, 180, 28);
//img.drawRect(0, 0, 180, 28);
setImage(img);
}
}

