package main.java.com.lotkavolterra; public class Slider extends Graphs { float x; // top left corner x position float y; // top left corner y position float w; // width of button String label; float w0; // Fill the box till Slider(String mylabel, float xpos, float ypos, float widthB) { x = xpos; y = ypos; w = widthB; label = mylabel; w0=0; } float get_speed(){ return w0/w; } boolean MouseIsOver( float mouseX, float mouseY) { if (mouseX > x && mouseX < (x + w) && mouseY > y-PIC_SIZE/2 && mouseY < (y + PIC_SIZE/2)) { w0=mouseX - x; return true; } return false; } }