Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int x = e.getX();
- int y = e.getY();
- if(x >= 50 && x<= 100 && y<= 80) {
- g.drawOval(50,50,20,20);
- Tableau[0][0] = 1;
- System.out.println("premiere cases");
- }
- else if(x >=100 && x<=150 && y<=80) {
- g.drawOval(100,50,20,20);
- Tableau[0][1] = 1;
- }
- else if(x >=150 && x<=200 && y<=80) {
- g.drawOval(150,50,20,20);
- }
- else if(x >=200 && x<=250 && y<=80) {
- g.drawOval(200,50,20,20);
- }
- else if(x >=250 && x<=300 && y<=80) {
- g.drawOval(250,50,20,20);
- }
- else {
- System.out.println("not both");
- }
Advertisement
Add Comment
Please, Sign In to add comment