Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Panneau extends JPanel {
- int x, y;
- public int GetX() {
- return x;
- }
- public int GetY() {
- return y;
- }
- public void setX(int x) {
- this.x = x;
- }
- public void setY(int y) {
- this.y = y;
- }
- public void paintComponent(Graphics g) {
- g.setColor(Color.BLACK);
- g.fillRect(0, 0, getWidth(), getHeight());
- g.setColor(Color.GREEN);
- g.fillOval(x, y, 30, 30);
- }
- }
Add Comment
Please, Sign In to add comment