package lt.bit; import javax.swing.*; import java.awt.*; public class GrafinePanele extends JPanel { private int x=50; public void move(){ this.x+=10; this.repaint(); } @Override protected void paintComponent(Graphics g) { super.paintComponent(g); // g.drawRect(30,30,200,200); g.setColor(Color.red); // g.drawOval(100,100,80,80); g.fillOval(this.x, 300,100,100); } }