-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCirclePopUps.java
More file actions
32 lines (29 loc) · 1012 Bytes
/
CirclePopUps.java
File metadata and controls
32 lines (29 loc) · 1012 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import javax.swing.*;
import java.awt.Component;
public class CirclePopUps {
public static void main(String[] args) {
JOptionPane popUp = new JOptionPane("You need to Upgrade your software!");
Icon icon = UIManager.getIcon("OptionPane.warningIcon");
popUp.setIcon(icon);
JDialog d = popUp.createDialog(null, "You Got Hacked!");
d.setLocationRelativeTo(null);
while(true) {
for (int i = 0; i < 10; i++) {
d.setLocation(100 * i, 0);
d.setVisible(true);
}
for (int i = 0; i < 8; i++) {
d.setLocation(1000, 100 * i);
d.setVisible(true);
}
for (int i = 0; i < 10; i++) {
d.setLocation(1000 - 100 * i, 1000);
d.setVisible(true);
}
for (int i = 0; i < 10; i++) {
d.setLocation(0, 1000 - 100 * i);
d.setVisible(true);
}
}
}
}