-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPopUps.java
More file actions
24 lines (21 loc) · 747 Bytes
/
PopUps.java
File metadata and controls
24 lines (21 loc) · 747 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
import javax.swing.*;
import java.awt.Component;
public class PopUps extends JDialog {
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 < 8; i++) {
d.setLocation(150 * i, 100 * i);
d.setVisible(true);
}
for (int i = 0; i < 8; i++) {
d.setLocation(150 * i, 750 - 125 * i);
d.setVisible(true);
}
}
}
}