Mine
public java v1 · immutable public void paintComponent(Graphics g) { int width = getWidth(); int height= getHeight(); float step=(float)width/(float)totaltime; g.setColor(Color.BLUE); // System.out.println(""+step*progress+"/"+step+"/"+progress+"/"+width+"/"+totaltime); g.fillRect(0,0,(int)(step*progress),height); g.setColor(new Color(200,200,255)); g.fillRect(0,0,(int)(step*progress),2); g.fillRect(0,0,Math.min(2,(int)(step*progress)),height); // g.fillRect(0,0,50,height); }