Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Lucksi
GitHub Repository: Lucksi/Mr.Holmes
Path: blob/master/Core/Support/Notification/Notification.java
1071 views
1
//ORIGINAL CREATOR: Luca Garofalo (Lucksi)
2
//AUTHOR: Luca Garofalo (Lucksi)
3
//Copyright (C) 2022-2023 Lucksi <[email protected]>
4
//License: GNU General Public License v3.0
5
6
import java.awt.Dimension;
7
import java.awt.Toolkit;
8
import javax.swing.JDialog;
9
import javax.swing.JOptionPane;
10
11
public class Notification{
12
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
13
14
public int GetWidht(){
15
int Value = 0;
16
Value = (int) screenSize.getWidth();
17
return Value;
18
}
19
20
public int GetHight(){
21
int Value = 0;
22
Value = (int) screenSize.getHeight();
23
return Value;
24
}
25
26
public Notification(){
27
int Width,Height ;
28
JOptionPane a = new JOptionPane("MR.HOLMES SCAN COMPLETED",JOptionPane.INFORMATION_MESSAGE);
29
JDialog d = a.createDialog(null);
30
Width = GetWidht();
31
Height = GetHight();
32
d.setLocation(Width,Height);
33
d.setVisible(true);
34
d.setTitle("MR.HOLMES");
35
d.setResizable(false);
36
d.dispose();
37
}
38
public static void main(String args[]){
39
new Notification();
40
}
41
}
42
43