initial commit

This commit is contained in:
Michel Roux 2018-09-29 20:05:42 +02:00
commit e1588c9228
6 changed files with 50 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
out/
.idea/*
!.idea/artifacts/

View File

@ -0,0 +1,12 @@
<component name="ArtifactManager">
<artifact type="jar" name="Symantec">
<output-path>$PROJECT_DIR$/out/artifacts/Symantec</output-path>
<root id="archive" name="Symantec.jar">
<element id="directory" name="META-INF">
<element id="file-copy" path="$PROJECT_DIR$/META-INF/MANIFEST.MF" />
</element>
<element id="module-output" name="Symantec" />
<element id="dir-copy" path="$PROJECT_DIR$/res" />
</root>
</artifact>
</component>

3
META-INF/MANIFEST.MF Normal file
View File

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: Symantec

11
Symantec.iml Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

BIN
res/Capture.PNG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

21
src/Symantec.java Normal file
View File

@ -0,0 +1,21 @@
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
public class Symantec {
public static void main(String[] args) {
Symantec symantec = new Symantec();
symantec.load();
}
private void load() {
try {
BufferedImage img = ImageIO.read(getClass().getResourceAsStream("Capture.PNG"));
TrayIcon trayIcon = new TrayIcon(img, "Symantec");
SystemTray tray = SystemTray.getSystemTray();
tray.add(trayIcon);
} catch (Exception e) {
e.printStackTrace();
}
}
}