public class P88rdskaalagaIndikaator extends Indikaator{ double amplituud=6.28; public P88rdskaalagaIndikaator(double protsent){ super(protsent); } public void paintComponent(java.awt.Graphics g){ double nurk=protsent/100*amplituud; double r=Math.min(getHeight(), getWidth())/3; double keskx=getWidth()/2; double kesky=getHeight()/2; g.drawLine((int)keskx, (int)kesky, (int)(keskx+r*Math.cos(nurk)), (int)(kesky+r*Math.sin(nurk))); } }