diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4504e3f --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +../nbproject/private/ +../build/ +../serverFolder/ +../clientFolder/ diff --git a/1.txt.pdf b/1.txt.pdf new file mode 100644 index 0000000..c3f6afc Binary files /dev/null and b/1.txt.pdf differ diff --git a/DiagramKelas.jpg b/DiagramKelas.jpg new file mode 100644 index 0000000..43695ee Binary files /dev/null and b/DiagramKelas.jpg differ diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..0a0587d --- /dev/null +++ b/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project onlineprinter. + + + diff --git a/build/classes/.netbeans_automatic_build b/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/build/classes/.netbeans_update_resources b/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/build/classes/Client/Client.class b/build/classes/Client/Client.class new file mode 100644 index 0000000..acf62ee Binary files /dev/null and b/build/classes/Client/Client.class differ diff --git a/build/classes/DateClient.rs b/build/classes/DateClient.rs new file mode 100644 index 0000000..d89f79e --- /dev/null +++ b/build/classes/DateClient.rs @@ -0,0 +1 @@ +onlineprinter.DateClient diff --git a/build/classes/DateServer.rs b/build/classes/DateServer.rs new file mode 100644 index 0000000..764d6e7 --- /dev/null +++ b/build/classes/DateServer.rs @@ -0,0 +1 @@ +onlineprinter.DateServer diff --git a/build/classes/Entity/Credential.class b/build/classes/Entity/Credential.class new file mode 100644 index 0000000..bd9a9a7 Binary files /dev/null and b/build/classes/Entity/Credential.class differ diff --git a/build/classes/Entity/TransObject.class b/build/classes/Entity/TransObject.class new file mode 100644 index 0000000..02a92d8 Binary files /dev/null and b/build/classes/Entity/TransObject.class differ diff --git a/build/classes/File/DOC.class b/build/classes/File/DOC.class new file mode 100644 index 0000000..37a4602 Binary files /dev/null and b/build/classes/File/DOC.class differ diff --git a/build/classes/File/FileFactory.class b/build/classes/File/FileFactory.class new file mode 100644 index 0000000..14fdd5e Binary files /dev/null and b/build/classes/File/FileFactory.class differ diff --git a/build/classes/File/PDF.class b/build/classes/File/PDF.class new file mode 100644 index 0000000..debd2ca Binary files /dev/null and b/build/classes/File/PDF.class differ diff --git a/build/classes/File/TXT.class b/build/classes/File/TXT.class new file mode 100644 index 0000000..78606f7 Binary files /dev/null and b/build/classes/File/TXT.class differ diff --git a/build/classes/GUI/FileDialog.form b/build/classes/GUI/FileDialog.form new file mode 100644 index 0000000..a613320 --- /dev/null +++ b/build/classes/GUI/FileDialog.form @@ -0,0 +1,48 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/build/classes/GUI/Login$1.class b/build/classes/GUI/Login$1.class new file mode 100644 index 0000000..68f8dc3 Binary files /dev/null and b/build/classes/GUI/Login$1.class differ diff --git a/build/classes/GUI/Login$2.class b/build/classes/GUI/Login$2.class new file mode 100644 index 0000000..7fb1cdc Binary files /dev/null and b/build/classes/GUI/Login$2.class differ diff --git a/build/classes/GUI/Login$3.class b/build/classes/GUI/Login$3.class new file mode 100644 index 0000000..60720ff Binary files /dev/null and b/build/classes/GUI/Login$3.class differ diff --git a/build/classes/GUI/Login.class b/build/classes/GUI/Login.class new file mode 100644 index 0000000..462d1c2 Binary files /dev/null and b/build/classes/GUI/Login.class differ diff --git a/build/classes/GUI/Login.form b/build/classes/GUI/Login.form new file mode 100644 index 0000000..bf2d660 --- /dev/null +++ b/build/classes/GUI/Login.form @@ -0,0 +1,185 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/classes/GUI/Upload$1.class b/build/classes/GUI/Upload$1.class new file mode 100644 index 0000000..ae6282e Binary files /dev/null and b/build/classes/GUI/Upload$1.class differ diff --git a/build/classes/GUI/Upload$2.class b/build/classes/GUI/Upload$2.class new file mode 100644 index 0000000..f769ebe Binary files /dev/null and b/build/classes/GUI/Upload$2.class differ diff --git a/build/classes/GUI/Upload.class b/build/classes/GUI/Upload.class new file mode 100644 index 0000000..7513183 Binary files /dev/null and b/build/classes/GUI/Upload.class differ diff --git a/build/classes/GUI/Upload.form b/build/classes/GUI/Upload.form new file mode 100644 index 0000000..12e0bf3 --- /dev/null +++ b/build/classes/GUI/Upload.form @@ -0,0 +1,540 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/classes/Server/Server.class b/build/classes/Server/Server.class new file mode 100644 index 0000000..8039345 Binary files /dev/null and b/build/classes/Server/Server.class differ diff --git a/build/classes/Server/ServerThread.class b/build/classes/Server/ServerThread.class new file mode 100644 index 0000000..2db993b Binary files /dev/null and b/build/classes/Server/ServerThread.class differ diff --git a/build/classes/cetak/Login$1.class b/build/classes/cetak/Login$1.class new file mode 100644 index 0000000..f7fb906 Binary files /dev/null and b/build/classes/cetak/Login$1.class differ diff --git a/build/classes/cetak/Login$2.class b/build/classes/cetak/Login$2.class new file mode 100644 index 0000000..f6a163b Binary files /dev/null and b/build/classes/cetak/Login$2.class differ diff --git a/build/classes/cetak/Login$3.class b/build/classes/cetak/Login$3.class new file mode 100644 index 0000000..62bbd79 Binary files /dev/null and b/build/classes/cetak/Login$3.class differ diff --git a/build/classes/cetak/Upload$1.class b/build/classes/cetak/Upload$1.class new file mode 100644 index 0000000..758e175 Binary files /dev/null and b/build/classes/cetak/Upload$1.class differ diff --git a/build/classes/cetak/Upload$2.class b/build/classes/cetak/Upload$2.class new file mode 100644 index 0000000..db521f1 Binary files /dev/null and b/build/classes/cetak/Upload$2.class differ diff --git a/build/classes/com/data/Database.class b/build/classes/com/data/Database.class new file mode 100644 index 0000000..570447a Binary files /dev/null and b/build/classes/com/data/Database.class differ diff --git a/build/classes/com/data/OOPDB.class b/build/classes/com/data/OOPDB.class new file mode 100644 index 0000000..4008e29 Binary files /dev/null and b/build/classes/com/data/OOPDB.class differ diff --git a/build/classes/com/data/User.class b/build/classes/com/data/User.class new file mode 100644 index 0000000..c7dd425 Binary files /dev/null and b/build/classes/com/data/User.class differ diff --git a/build/classes/com/data/UserDao.class b/build/classes/com/data/UserDao.class new file mode 100644 index 0000000..27a6a96 Binary files /dev/null and b/build/classes/com/data/UserDao.class differ diff --git a/build/classes/com/data/UserDaoImpl.class b/build/classes/com/data/UserDaoImpl.class new file mode 100644 index 0000000..91c4981 Binary files /dev/null and b/build/classes/com/data/UserDaoImpl.class differ diff --git a/build/classes/onlineprinter/Encrypt.class b/build/classes/onlineprinter/Encrypt.class new file mode 100644 index 0000000..eb1c158 Binary files /dev/null and b/build/classes/onlineprinter/Encrypt.class differ diff --git a/build/classes/onlineprinter/FileDialog.rs b/build/classes/onlineprinter/FileDialog.rs new file mode 100644 index 0000000..d92df4b --- /dev/null +++ b/build/classes/onlineprinter/FileDialog.rs @@ -0,0 +1 @@ +cetak.FileDialog diff --git a/build/classes/onlineprinter/Login.rs b/build/classes/onlineprinter/Login.rs new file mode 100644 index 0000000..86ed422 --- /dev/null +++ b/build/classes/onlineprinter/Login.rs @@ -0,0 +1,4 @@ +cetak.Login$3 +cetak.Login$2 +cetak.Login$1 +cetak.Login diff --git a/build/classes/onlineprinter/Main.class b/build/classes/onlineprinter/Main.class new file mode 100644 index 0000000..442f3df Binary files /dev/null and b/build/classes/onlineprinter/Main.class differ diff --git a/build/classes/onlineprinter/Upload.rs b/build/classes/onlineprinter/Upload.rs new file mode 100644 index 0000000..832a383 --- /dev/null +++ b/build/classes/onlineprinter/Upload.rs @@ -0,0 +1,3 @@ +cetak.Upload +cetak.Upload$1 +cetak.Upload$2 diff --git a/build/classes/onlineprinter/User_1.rs b/build/classes/onlineprinter/User_1.rs new file mode 100644 index 0000000..5ee58b0 --- /dev/null +++ b/build/classes/onlineprinter/User_1.rs @@ -0,0 +1,6 @@ +cetak.User$5 +cetak.User$4 +cetak.User$3 +cetak.User$2 +cetak.User$1 +cetak.User diff --git a/clientFolder/TSocket.pdf b/clientFolder/TSocket.pdf new file mode 100644 index 0000000..f4a7986 Binary files /dev/null and b/clientFolder/TSocket.pdf differ diff --git a/clientFolder/Timeline.xlsx b/clientFolder/Timeline.xlsx new file mode 100644 index 0000000..79d8598 Binary files /dev/null and b/clientFolder/Timeline.xlsx differ diff --git a/clientFolder/hasil.pdf b/clientFolder/hasil.pdf new file mode 100644 index 0000000..70add7b Binary files /dev/null and b/clientFolder/hasil.pdf differ diff --git a/clientFolder/new.txt b/clientFolder/new.txt new file mode 100644 index 0000000..d018b73 --- /dev/null +++ b/clientFolder/new.txt @@ -0,0 +1 @@ +asdasdsadsadsad diff --git a/clientFolder/receive.pdf b/clientFolder/receive.pdf new file mode 100644 index 0000000..70add7b Binary files /dev/null and b/clientFolder/receive.pdf differ diff --git a/clientFolder/receive2.pdf b/clientFolder/receive2.pdf new file mode 100644 index 0000000..1bd5623 Binary files /dev/null and b/clientFolder/receive2.pdf differ diff --git a/config.xml b/config.xml new file mode 100644 index 0000000..9fbffae --- /dev/null +++ b/config.xml @@ -0,0 +1,19 @@ + + + + + + + localhost + root + + printer_online + + + localhost + + diff --git a/lib/bcmail-jdk14-138.jar b/lib/bcmail-jdk14-138.jar new file mode 100644 index 0000000..ab606b5 Binary files /dev/null and b/lib/bcmail-jdk14-138.jar differ diff --git a/lib/bcprov-jdk14-138.jar b/lib/bcprov-jdk14-138.jar new file mode 100644 index 0000000..d1befb7 Binary files /dev/null and b/lib/bcprov-jdk14-138.jar differ diff --git a/lib/commons-codec-1.5.jar b/lib/commons-codec-1.5.jar new file mode 100644 index 0000000..e9013fe Binary files /dev/null and b/lib/commons-codec-1.5.jar differ diff --git a/lib/dom4j-1.6.1.jar b/lib/dom4j-1.6.1.jar new file mode 100644 index 0000000..c8c4dbb Binary files /dev/null and b/lib/dom4j-1.6.1.jar differ diff --git a/lib/fr.opensagres.xdocreport.itext.extension-1.0.0.jar b/lib/fr.opensagres.xdocreport.itext.extension-1.0.0.jar new file mode 100644 index 0000000..4c18595 Binary files /dev/null and b/lib/fr.opensagres.xdocreport.itext.extension-1.0.0.jar differ diff --git a/lib/itext-2.1.7.jar b/lib/itext-2.1.7.jar new file mode 100644 index 0000000..3f2c188 Binary files /dev/null and b/lib/itext-2.1.7.jar differ diff --git a/lib/itext-pdfa-5.5.0-sources.jar b/lib/itext-pdfa-5.5.0-sources.jar new file mode 100644 index 0000000..009fd7c Binary files /dev/null and b/lib/itext-pdfa-5.5.0-sources.jar differ diff --git a/lib/itext-pdfa-5.5.0.jar b/lib/itext-pdfa-5.5.0.jar new file mode 100644 index 0000000..6946b6d Binary files /dev/null and b/lib/itext-pdfa-5.5.0.jar differ diff --git a/lib/itext-xtra-5.5.0-sources.jar b/lib/itext-xtra-5.5.0-sources.jar new file mode 100644 index 0000000..9e8ab27 Binary files /dev/null and b/lib/itext-xtra-5.5.0-sources.jar differ diff --git a/lib/itext-xtra-5.5.0.jar b/lib/itext-xtra-5.5.0.jar new file mode 100644 index 0000000..0c19c3f Binary files /dev/null and b/lib/itext-xtra-5.5.0.jar differ diff --git a/lib/itextpdf-5.5.0-sources.jar b/lib/itextpdf-5.5.0-sources.jar new file mode 100644 index 0000000..0142b03 Binary files /dev/null and b/lib/itextpdf-5.5.0-sources.jar differ diff --git a/lib/itextpdf-5.5.0.jar b/lib/itextpdf-5.5.0.jar new file mode 100644 index 0000000..98b345f Binary files /dev/null and b/lib/itextpdf-5.5.0.jar differ diff --git a/lib/ooxml-schemas-1.1.jar b/lib/ooxml-schemas-1.1.jar new file mode 100644 index 0000000..1bf4693 Binary files /dev/null and b/lib/ooxml-schemas-1.1.jar differ diff --git a/lib/org.apache.poi.xwpf.converter.core-1.0.0.jar b/lib/org.apache.poi.xwpf.converter.core-1.0.0.jar new file mode 100644 index 0000000..8161587 Binary files /dev/null and b/lib/org.apache.poi.xwpf.converter.core-1.0.0.jar differ diff --git a/lib/org.apache.poi.xwpf.converter.pdf-1.0.0.jar b/lib/org.apache.poi.xwpf.converter.pdf-1.0.0.jar new file mode 100644 index 0000000..d09c32a Binary files /dev/null and b/lib/org.apache.poi.xwpf.converter.pdf-1.0.0.jar differ diff --git a/lib/org.apache.poi.xwpf.converter.xhtml-1.0.0.jar b/lib/org.apache.poi.xwpf.converter.xhtml-1.0.0.jar new file mode 100644 index 0000000..c3a3e6a Binary files /dev/null and b/lib/org.apache.poi.xwpf.converter.xhtml-1.0.0.jar differ diff --git a/lib/pdfbox-app-1.8.5.jar b/lib/pdfbox-app-1.8.5.jar new file mode 100644 index 0000000..7c64828 Binary files /dev/null and b/lib/pdfbox-app-1.8.5.jar differ diff --git a/lib/poi-3.8.jar b/lib/poi-3.8.jar new file mode 100644 index 0000000..edc0ee5 Binary files /dev/null and b/lib/poi-3.8.jar differ diff --git a/lib/poi-ooxml-3.8.jar b/lib/poi-ooxml-3.8.jar new file mode 100644 index 0000000..9175c16 Binary files /dev/null and b/lib/poi-ooxml-3.8.jar differ diff --git a/lib/stax-api-1.0.1.jar b/lib/stax-api-1.0.1.jar new file mode 100644 index 0000000..d9a1665 Binary files /dev/null and b/lib/stax-api-1.0.1.jar differ diff --git a/lib/xml-apis-1.0.b2.jar b/lib/xml-apis-1.0.b2.jar new file mode 100644 index 0000000..ad33a5a Binary files /dev/null and b/lib/xml-apis-1.0.b2.jar differ diff --git a/lib/xmlbeans-2.3.0.jar b/lib/xmlbeans-2.3.0.jar new file mode 100644 index 0000000..ccd8163 Binary files /dev/null and b/lib/xmlbeans-2.3.0.jar differ diff --git a/manifest.mf b/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml new file mode 100644 index 0000000..ff8d09a --- /dev/null +++ b/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties new file mode 100644 index 0000000..bb3a747 --- /dev/null +++ b/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=201e7e1d +build.xml.script.CRC32=37256dee +build.xml.stylesheet.CRC32=8064a381@1.74.1.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=201e7e1d +nbproject/build-impl.xml.script.CRC32=b4571db3 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.74.1.48 diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties new file mode 100644 index 0000000..777922f --- /dev/null +++ b/nbproject/private/private.properties @@ -0,0 +1,6 @@ +compile.on.save=true +do.depend=false +do.jar=true +javac.debug=true +javadoc.preview=true +user.properties.file=C:\\Users\\adwisatya\\AppData\\Roaming\\NetBeans\\8.0\\build.properties diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml new file mode 100644 index 0000000..b3816f5 --- /dev/null +++ b/nbproject/private/private.xml @@ -0,0 +1,20 @@ + + + + + + file:/C:/Users/adwisatya/Documents/NetBeansProjects/if2210-tubes2/src/file/TXT.java + file:/C:/Users/adwisatya/Documents/NetBeansProjects/if2210-tubes2/src/server/ServerThread.java + file:/C:/Users/adwisatya/Documents/NetBeansProjects/if2210-tubes2/src/file/PDF.java + file:/C:/Users/adwisatya/Documents/NetBeansProjects/if2210-tubes2/src/com/data/OOPDB.java + file:/C:/Users/adwisatya/Documents/NetBeansProjects/if2210-tubes2/src/file/FileFactory.java + file:/C:/Users/adwisatya/Documents/NetBeansProjects/if2210-tubes2/src/file/MyFile.java + file:/C:/Users/adwisatya/Documents/NetBeansProjects/if2210-tubes2/src/com/data/Database.java + file:/C:/Users/adwisatya/Documents/NetBeansProjects/if2210-tubes2/src/server/ServerManager.java + file:/C:/Users/adwisatya/Documents/NetBeansProjects/if2210-tubes2/src/client/Client.java + file:/C:/Users/adwisatya/Documents/NetBeansProjects/if2210-tubes2/src/file/DOC.java + file:/C:/Users/adwisatya/Documents/NetBeansProjects/if2210-tubes2/src/com/data/UserDao.java + file:/C:/Users/adwisatya/Documents/NetBeansProjects/if2210-tubes2/src/client/ConsoleClient.java + + + diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 0000000..59812ff --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,128 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +application.title=onlineprinter +application.vendor=Gilang +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/onlineprinter.jar +dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= +excludes= +file.reference.bcmail-jdk14-138.jar=lib/bcmail-jdk14-138.jar +file.reference.bcprov-jdk14-138.jar=lib/bcprov-jdk14-138.jar +file.reference.commons-codec-1.5.jar=lib/commons-codec-1.5.jar +file.reference.dom4j-1.6.1.jar=lib/dom4j-1.6.1.jar +file.reference.fr.opensagres.xdocreport.itext.extension-1.0.0.jar=lib/fr.opensagres.xdocreport.itext.extension-1.0.0.jar +file.reference.itext-2.1.7.jar=lib/itext-2.1.7.jar +file.reference.itext-pdfa-5.5.0-sources.jar=lib/itext-pdfa-5.5.0-sources.jar +file.reference.itext-pdfa-5.5.0.jar=lib/itext-pdfa-5.5.0.jar +file.reference.itext-xtra-5.5.0-sources.jar=lib/itext-xtra-5.5.0-sources.jar +file.reference.itext-xtra-5.5.0.jar=lib/itext-xtra-5.5.0.jar +file.reference.itextpdf-5.5.0-sources.jar=lib/itextpdf-5.5.0-sources.jar +file.reference.itextpdf-5.5.0.jar=lib/itextpdf-5.5.0.jar +file.reference.mysql-connector-java-5.1.30-bin.jar=C:\\Program Files\\Java\\jdk1.8.0_05\\lib\\mysql-connector-java-5.1.30-bin.jar +file.reference.ooxml-schemas-1.1.jar=lib/ooxml-schemas-1.1.jar +file.reference.org.apache.poi.xwpf.converter.core-1.0.0.jar=lib/org.apache.poi.xwpf.converter.core-1.0.0.jar +file.reference.org.apache.poi.xwpf.converter.pdf-1.0.0.jar=lib/org.apache.poi.xwpf.converter.pdf-1.0.0.jar +file.reference.org.apache.poi.xwpf.converter.xhtml-1.0.0.jar=lib/org.apache.poi.xwpf.converter.xhtml-1.0.0.jar +file.reference.pdfbox-app-1.8.5.jar=C:\\Program Files\\Java\\jdk1.8.0_05\\lib\\pdfbox-app-1.8.5.jar +file.reference.pdfbox-app-1.8.5.jar-1=lib\\pdfbox-app-1.8.5.jar +file.reference.poi-3.8.jar=lib/poi-3.8.jar +file.reference.poi-ooxml-3.8.jar=lib/poi-ooxml-3.8.jar +file.reference.stax-api-1.0.1.jar=lib/stax-api-1.0.1.jar +file.reference.xml-apis-1.0.b2.jar=lib/xml-apis-1.0.b2.jar +file.reference.xmlbeans-2.3.0.jar=lib/xmlbeans-2.3.0.jar +includes=** +jar.compress=false +javac.classpath=\ + ${file.reference.mysql-connector-java-5.1.30-bin.jar}:\ + ${libs.MySQLDriver.classpath}:\ + ${file.reference.bcmail-jdk14-138.jar}:\ + ${file.reference.bcprov-jdk14-138.jar}:\ + ${file.reference.commons-codec-1.5.jar}:\ + ${file.reference.dom4j-1.6.1.jar}:\ + ${file.reference.fr.opensagres.xdocreport.itext.extension-1.0.0.jar}:\ + ${file.reference.itext-2.1.7.jar}:\ + ${file.reference.itext-pdfa-5.5.0-sources.jar}:\ + ${file.reference.itext-pdfa-5.5.0.jar}:\ + ${file.reference.itext-xtra-5.5.0-sources.jar}:\ + ${file.reference.itext-xtra-5.5.0.jar}:\ + ${file.reference.itextpdf-5.5.0-sources.jar}:\ + ${file.reference.itextpdf-5.5.0.jar}:\ + ${file.reference.ooxml-schemas-1.1.jar}:\ + ${file.reference.org.apache.poi.xwpf.converter.core-1.0.0.jar}:\ + ${file.reference.org.apache.poi.xwpf.converter.pdf-1.0.0.jar}:\ + ${file.reference.org.apache.poi.xwpf.converter.xhtml-1.0.0.jar}:\ + ${file.reference.poi-3.8.jar}:\ + ${file.reference.poi-ooxml-3.8.jar}:\ + ${file.reference.stax-api-1.0.1.jar}:\ + ${file.reference.xml-apis-1.0.b2.jar}:\ + ${file.reference.xmlbeans-2.3.0.jar}:\ + <<<<<<< HEAD:\ + ${file.reference.pdfbox-app-1.8.5.jar-1} + ${libs.beans-binding.classpath} +======= + ${file.reference.pdfbox-app-1.8.5.jar} +>>>>>>> eb1de257bb22af57d0ae943abe8db994f0a43b3b +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=onlineprinter.Main +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 0000000..8cafa80 --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + onlineprinter + + + + + + + + + diff --git a/new.txt b/new.txt new file mode 100644 index 0000000..d018b73 --- /dev/null +++ b/new.txt @@ -0,0 +1 @@ +asdasdsadsadsad diff --git a/serverFolder/admin/1.docx b/serverFolder/admin/1.docx new file mode 100644 index 0000000..526e8ca Binary files /dev/null and b/serverFolder/admin/1.docx differ diff --git a/serverFolder/admin/1.docx.pdf b/serverFolder/admin/1.docx.pdf new file mode 100644 index 0000000..a908431 Binary files /dev/null and b/serverFolder/admin/1.docx.pdf differ diff --git a/serverFolder/admin/1.txt b/serverFolder/admin/1.txt new file mode 100644 index 0000000..5425164 --- /dev/null +++ b/serverFolder/admin/1.txt @@ -0,0 +1 @@ +1+1=2 \ No newline at end of file diff --git a/serverFolder/admin/1.txt.pdf b/serverFolder/admin/1.txt.pdf new file mode 100644 index 0000000..6792762 Binary files /dev/null and b/serverFolder/admin/1.txt.pdf differ diff --git a/serverFolder/admin1.txt.pdf b/serverFolder/admin1.txt.pdf new file mode 100644 index 0000000..c236fb4 Binary files /dev/null and b/serverFolder/admin1.txt.pdf differ diff --git a/serverSide.uml b/serverSide.uml new file mode 100644 index 0000000..2f72d80 --- /dev/null +++ b/serverSide.uml @@ -0,0 +1,2306 @@ + + + + + + +UMLStandard + + + + +Untitled +5 + +Use Case Model +UMLStandard +useCaseModel +zEDJUB2NaEmuzH5LO/lT3AAA +1 + +Main +F2EQGtnMmkeFeoX0zlJdbQAA + +PAvoIX3MF0qTW0GBmT0BxQAA + + + + +Analysis Model +UMLStandard +analysisModel +zEDJUB2NaEmuzH5LO/lT3AAA +1 + +Main +True +RobustnessDiagram +pnZys2/sTUK1PXG4O5iljgAA + +GWwjjewQCU+huCn40aUu9gAA + + + + +Design Model +UMLStandard +designModel +zEDJUB2NaEmuzH5LO/lT3AAA +1 + +Main +True +c43YTGE/ykuIyb3S3/P5ogAA + +DquyxDrjx0GFxP+GiD9PDAAA +22 + +clMaroon +$00B9FFFF +280 +88 +101 +69 +Je1ODxMLgU+/Wz0zKrJICwAA + + +1 +Main + + +False + + +False + + + +Je1ODxMLgU+/Wz0zKrJICwAA + + +Je1ODxMLgU+/Wz0zKrJICwAA + + +False +Je1ODxMLgU+/Wz0zKrJICwAA + + + +clMaroon +$00B9FFFF +32 +432 +144 +147 +CRn3SE8/OEiSQa/JR155QgAA + + +1 +Printer + + +False + + +False + + + +CRn3SE8/OEiSQa/JR155QgAA + + +CRn3SE8/OEiSQa/JR155QgAA + + +False +CRn3SE8/OEiSQa/JR155QgAA + + + +clMaroon +$00B9FFFF +48 +264 +108 +56 +ljPe9KCvHEKY8LGu5TiItgAA + + +1 +Printer Controller + + +False + + +False + + + +ljPe9KCvHEKY8LGu5TiItgAA + + +ljPe9KCvHEKY8LGu5TiItgAA + + +False +ljPe9KCvHEKY8LGu5TiItgAA + + + +clMaroon +$00B9FFFF +101,319;102,432 +Mn3z7TcZBUie6mqTn2GZmgAA +1iiJuB1pM0WLfuza47VlpAAA +5XCtqYSKr0yLIi3jJfPCwQAA + +15707963267949 +15 +use +Mn3z7TcZBUie6mqTn2GZmgAA + + +False +15707963267949 +30 +Mn3z7TcZBUie6mqTn2GZmgAA + + +False +-15707963267949 +15 +Mn3z7TcZBUie6mqTn2GZmgAA + + +False +-523598775598299 +30 +epHead +2Skiwuz5GkWTFjEw4fPRIwAA + + +False +523598775598299 +30 +epTail +psv+j2u89ECSohbQSoRu8wAA + + +False +523598775598299 +25 +epHead +2Skiwuz5GkWTFjEw4fPRIwAA + + +False +-523598775598299 +25 +epTail +psv+j2u89ECSohbQSoRu8wAA + + +False +-785398163397448 +40 +epHead +2Skiwuz5GkWTFjEw4fPRIwAA + + +False +785398163397448 +40 +epTail +psv+j2u89ECSohbQSoRu8wAA + + +False +-1000 +-1000 +50 +8 +2Skiwuz5GkWTFjEw4fPRIwAA + + +False +-1000 +-1000 +50 +8 +psv+j2u89ECSohbQSoRu8wAA + + + +clMaroon +$00B9FFFF +340 +448 +140 +121 +dGIgqO1b+02swSmmE/PApQAA + + +1 +Job + + +False + + +False + + + +dGIgqO1b+02swSmmE/PApQAA + + +dGIgqO1b+02swSmmE/PApQAA + + +False +dGIgqO1b+02swSmmE/PApQAA + + + +clMaroon +$00B9FFFF +175,506;340,507 +txQO9BTSKESXwnmbFTO6mgAA +wPxO30pr7UyLjYrgi805AAAA +1iiJuB1pM0WLfuza47VlpAAA + +15707963267949 +15 +use +txQO9BTSKESXwnmbFTO6mgAA + + +False +15707963267949 +30 +txQO9BTSKESXwnmbFTO6mgAA + + +False +-15707963267949 +15 +txQO9BTSKESXwnmbFTO6mgAA + + +False +-523598775598299 +30 +epHead +pKRl944T9k2YDv3nQRA0vgAA + + +False +523598775598299 +30 +epTail +JeeK2Y/EpUShfGb8R069/QAA + + +False +523598775598299 +25 +epHead +pKRl944T9k2YDv3nQRA0vgAA + + +False +-523598775598299 +25 +epTail +JeeK2Y/EpUShfGb8R069/QAA + + +False +-785398163397448 +40 +epHead +pKRl944T9k2YDv3nQRA0vgAA + + +False +785398163397448 +40 +epTail +JeeK2Y/EpUShfGb8R069/QAA + + +False +-1000 +-1000 +50 +8 +pKRl944T9k2YDv3nQRA0vgAA + + +False +-1000 +-1000 +50 +8 +JeeK2Y/EpUShfGb8R069/QAA + + + +clMaroon +$00B9FFFF +336 +616 +159 +95 +/xdYBoDVykyunGWHl8b9WgAA + + +1 +File + + +<<interface>> + + +False + + + +/xdYBoDVykyunGWHl8b9WgAA + + +/xdYBoDVykyunGWHl8b9WgAA + + +False +/xdYBoDVykyunGWHl8b9WgAA + + + +clMaroon +$00B9FFFF +36 +884 +159 +134 +lXpAXMNfc0SS4TFrrcL3nwAA + + +1 +PDF + + +False + + +False + + + +lXpAXMNfc0SS4TFrrcL3nwAA + + +lXpAXMNfc0SS4TFrrcL3nwAA + + +False +lXpAXMNfc0SS4TFrrcL3nwAA + + + +clMaroon +$00B9FFFF +366,710;184,884 +aa8gPGS0lkWM6dszsiYHGgAA +sroAGP2EfUOIlr7nlA0x2AAA +VyNi5sUiO0eNOJa1s3f/tgAA + +15707963267949 +15 +implements +aa8gPGS0lkWM6dszsiYHGgAA + + +False +15707963267949 +30 +aa8gPGS0lkWM6dszsiYHGgAA + + +False +-15707963267949 +15 +aa8gPGS0lkWM6dszsiYHGgAA + + + +clMaroon +$00B9FFFF +328 +880 +159 +134 +8RXqfu5a50yQTA63XnhnrwAA + + +1 +TXT + + +False + + +False + + + +8RXqfu5a50yQTA63XnhnrwAA + + +8RXqfu5a50yQTA63XnhnrwAA + + +False +8RXqfu5a50yQTA63XnhnrwAA + + + +clMaroon +$00B9FFFF +604 +880 +159 +134 +fyqgrHltbE29Uivkx/EvHQAA + + +1 +DOC + + +False + + +False + + + +fyqgrHltbE29Uivkx/EvHQAA + + +fyqgrHltbE29Uivkx/EvHQAA + + +False +fyqgrHltbE29Uivkx/EvHQAA + + + +clMaroon +$00B9FFFF +411,568;413,616 +33PYdqnf0E+uJQzrW4ZNGgAA +VyNi5sUiO0eNOJa1s3f/tgAA +wPxO30pr7UyLjYrgi805AAAA + +15707963267949 +15 +use +33PYdqnf0E+uJQzrW4ZNGgAA + + +False +15707963267949 +30 +33PYdqnf0E+uJQzrW4ZNGgAA + + +False +-15707963267949 +15 +33PYdqnf0E+uJQzrW4ZNGgAA + + +False +-523598775598299 +30 +epHead +OhPEPX8T7kuWWBVzhbN0QwAA + + +False +523598775598299 +30 +epTail +CuiK7xWE0kO7//SGaliXEwAA + + +False +523598775598299 +25 +epHead +OhPEPX8T7kuWWBVzhbN0QwAA + + +False +-523598775598299 +25 +epTail +CuiK7xWE0kO7//SGaliXEwAA + + +False +-785398163397448 +40 +epHead +OhPEPX8T7kuWWBVzhbN0QwAA + + +False +785398163397448 +40 +epTail +CuiK7xWE0kO7//SGaliXEwAA + + +False +-1000 +-1000 +50 +8 +OhPEPX8T7kuWWBVzhbN0QwAA + + +False +-1000 +-1000 +50 +8 +CuiK7xWE0kO7//SGaliXEwAA + + + +clMaroon +$00B9FFFF +414,710;409,880 +FpXLLeXxRE+agKHew6sDuwAA +9Bao2WNfAk+cx/MKPPMtlAAA +VyNi5sUiO0eNOJa1s3f/tgAA + +15707963267949 +15 +implements +FpXLLeXxRE+agKHew6sDuwAA + + +False +15707963267949 +30 +FpXLLeXxRE+agKHew6sDuwAA + + +False +-15707963267949 +15 +FpXLLeXxRE+agKHew6sDuwAA + + + +clMaroon +$00B9FFFF +460,710;621,880 +HZaqSpPUPkOedE4rUS5nCgAA +/CU4qQ37sUG+5iljBc7wgAAA +VyNi5sUiO0eNOJa1s3f/tgAA + +15707963267949 +15 +implements +HZaqSpPUPkOedE4rUS5nCgAA + + +False +15707963267949 +30 +HZaqSpPUPkOedE4rUS5nCgAA + + +False +-15707963267949 +15 +HZaqSpPUPkOedE4rUS5nCgAA + + + +clMaroon +$00B9FFFF +284,156;138,264 +7OrPYjkLwk+b2f4lzMAsvAAA +5XCtqYSKr0yLIi3jJfPCwQAA +7NF6I0OcDkKlrEAa1bhPtgAA + +15707963267949 +15 +use +7OrPYjkLwk+b2f4lzMAsvAAA + + +False +15707963267949 +30 +7OrPYjkLwk+b2f4lzMAsvAAA + + +False +-15707963267949 +15 +7OrPYjkLwk+b2f4lzMAsvAAA + + +False +-523598775598299 +30 +epHead +eZUuMfOOBUShvo+fTaVU5QAA + + +False +523598775598299 +30 +epTail +j9eKg+pzlESHxny1rkg+IAAA + + +False +523598775598299 +25 +epHead +eZUuMfOOBUShvo+fTaVU5QAA + + +False +-523598775598299 +25 +epTail +j9eKg+pzlESHxny1rkg+IAAA + + +False +-785398163397448 +40 +epHead +eZUuMfOOBUShvo+fTaVU5QAA + + +False +785398163397448 +40 +epTail +j9eKg+pzlESHxny1rkg+IAAA + + +False +-1000 +-1000 +50 +8 +eZUuMfOOBUShvo+fTaVU5QAA + + +False +-1000 +-1000 +50 +8 +j9eKg+pzlESHxny1rkg+IAAA + + + +clMaroon +$00B9FFFF +516 +88 +205 +264 +WEmomJSAJkGUGSVFLuUhRwAA + + +1 +User + + +False + + +False + + + +WEmomJSAJkGUGSVFLuUhRwAA + + +WEmomJSAJkGUGSVFLuUhRwAA + + +False +WEmomJSAJkGUGSVFLuUhRwAA + + + +clMaroon +$00B9FFFF +816 +152 +207 +134 +AQo+m9pBZE+nR9cJGleY8AAA + + +1 +UserDao + + +<<interface>> + + +False + + + +AQo+m9pBZE+nR9cJGleY8AAA + + +AQo+m9pBZE+nR9cJGleY8AAA + + +False +AQo+m9pBZE+nR9cJGleY8AAA + + + +clMaroon +$00B9FFFF +816,218;720,218 +UIVOqgDNgkaW1EuED+WwcwAA +T1SmD3ije0aB0jrQAjhQ9QAA +TRB24MaURUmnftaJu8VduwAA + +1,5707963267949 +15 +uses +UIVOqgDNgkaW1EuED+WwcwAA + + +False +1,5707963267949 +30 +UIVOqgDNgkaW1EuED+WwcwAA + + +False +-1,5707963267949 +15 +UIVOqgDNgkaW1EuED+WwcwAA + + +False +-0,523598775598299 +30 +epHead +mVhFih5/n0WDGhTXH0JN5wAA + + +False +0,523598775598299 +30 +epTail +0h7SfuAoOUSJGu6E8vvx+AAA + + +False +0,523598775598299 +25 +epHead +mVhFih5/n0WDGhTXH0JN5wAA + + +False +-0,523598775598299 +25 +epTail +0h7SfuAoOUSJGu6E8vvx+AAA + + +False +-0,785398163397448 +40 +epHead +mVhFih5/n0WDGhTXH0JN5wAA + + +False +0,785398163397448 +40 +epTail +0h7SfuAoOUSJGu6E8vvx+AAA + + +False +-1000 +-1000 +50 +8 +mVhFih5/n0WDGhTXH0JN5wAA + + +False +-1000 +-1000 +50 +8 +0h7SfuAoOUSJGu6E8vvx+AAA + + + +clMaroon +$00B9FFFF +860 +432 +121 +69 +slPVZKNnhEC07+VE4j5QjwAA + + +1 +UserDaoImplement + + +False + + +False + + + +slPVZKNnhEC07+VE4j5QjwAA + + +slPVZKNnhEC07+VE4j5QjwAA + + +False +slPVZKNnhEC07+VE4j5QjwAA + + + +clMaroon +$00B9FFFF +556 +384 +146 +160 +oQkaFLMlUkm+S6E19johzwAA + + +1 +Database + + +False + + +False + + + +oQkaFLMlUkm+S6E19johzwAA + + +oQkaFLMlUkm+S6E19johzwAA + + +False +oQkaFLMlUkm+S6E19johzwAA + + + +clMaroon +$00B9FFFF +860,465;701,464 +EO2Z0Ie82UaemxOv5UoS/QAA +0DrmHK/tMUWA2bpQvMuf4AAA +rrRgFdQ7lkm0GvCmZyepmwAA + +1,5707963267949 +15 +extends +EO2Z0Ie82UaemxOv5UoS/QAA + + +False +1,5707963267949 +30 +EO2Z0Ie82UaemxOv5UoS/QAA + + +False +-1,5707963267949 +15 +EO2Z0Ie82UaemxOv5UoS/QAA + + +False +-0,523598775598299 +30 +epHead +xGfnmrXJHEqyYV4NyWK3JAAA + + +False +0,523598775598299 +30 +epTail +Bo77L7Fbg0G4vCJd3IITMQAA + + +False +0,523598775598299 +25 +epHead +xGfnmrXJHEqyYV4NyWK3JAAA + + +False +-0,523598775598299 +25 +epTail +Bo77L7Fbg0G4vCJd3IITMQAA + + +False +-0,785398163397448 +40 +epHead +xGfnmrXJHEqyYV4NyWK3JAAA + + +False +0,785398163397448 +40 +epTail +Bo77L7Fbg0G4vCJd3IITMQAA + + +False +-1000 +-1000 +50 +8 +xGfnmrXJHEqyYV4NyWK3JAAA + + +False +-1000 +-1000 +50 +8 +Bo77L7Fbg0G4vCJd3IITMQAA + + + +clMaroon +$00B9FFFF +920,432;919,285 +y8MnAq3xy0Kgzz+8Zn0rbAAA +TRB24MaURUmnftaJu8VduwAA +rrRgFdQ7lkm0GvCmZyepmwAA + +1,5707963267949 +15 +implements +y8MnAq3xy0Kgzz+8Zn0rbAAA + + +False +1,5707963267949 +30 +y8MnAq3xy0Kgzz+8Zn0rbAAA + + +False +-1,5707963267949 +15 +y8MnAq3xy0Kgzz+8Zn0rbAAA + + +False +-0,523598775598299 +30 +epHead +fJL7/YU3Qky9aqMWQJRnAwAA + + +False +0,523598775598299 +30 +epTail +f0rb6WGiskiNfioDnqTl9gAA + + +False +0,523598775598299 +25 +epHead +fJL7/YU3Qky9aqMWQJRnAwAA + + +False +-0,523598775598299 +25 +epTail +f0rb6WGiskiNfioDnqTl9gAA + + +False +-0,785398163397448 +40 +epHead +fJL7/YU3Qky9aqMWQJRnAwAA + + +False +0,785398163397448 +40 +epTail +f0rb6WGiskiNfioDnqTl9gAA + + +False +-1000 +-1000 +50 +8 +fJL7/YU3Qky9aqMWQJRnAwAA + + +False +-1000 +-1000 +50 +8 +f0rb6WGiskiNfioDnqTl9gAA + + + + +29 + +Subsystem1 +c43YTGE/ykuIyb3S3/P5ogAA + + +Main +c43YTGE/ykuIyb3S3/P5ogAA +4 +7NF6I0OcDkKlrEAa1bhPtgAA +ZKjMBcDJd0Ssbb3afngNrwAA +E1c9qHgzCku6PAPEi7VTKQAA +XasYVppJsUiCc8seChYITgAA +1 + +Jung, Yoontae +Je1ODxMLgU+/Wz0zKrJICwAA + +2 + +main +Je1ODxMLgU+/Wz0zKrJICwAA +1 + +pdkReturn +void +UfEaKRkT/EGcuA/Vqx6WcgAA + + + +readDB +Je1ODxMLgU+/Wz0zKrJICwAA +1 + +pdkReturn +void +FF78mKbMoUa/0ZZu3PpMSgAA + + +2 ++I0E5XyFoUqSsC5hV7CCpgAA +j9eKg+pzlESHxny1rkg+IAAA + + +Printer +c43YTGE/ykuIyb3S3/P5ogAA +4 +1iiJuB1pM0WLfuza47VlpAAA +pux9OUnpx0K9VmpJHbLWmQAA +5rK/TpXtCEiZsK8GsnaUwAAA +a5ER8Izke0Wex8M5maFVrgAA +3 + +isReady +CRn3SE8/OEiSQa/JR155QgAA +1 + +pdkReturn +boolean +ritw7fWA3UGTJ6RnzTN4/AAA + + + +prosesQueue +CRn3SE8/OEiSQa/JR155QgAA +1 + +pdkReturn +void +NEwAO7H1VE+8SBQxBXVNFQAA + + + +addQueue +CRn3SE8/OEiSQa/JR155QgAA +2 + +pdkReturn +void +tBBY/O+grECBeEUmP0GNNwAA + + +_file +file +tBBY/O+grECBeEUmP0GNNwAA + + +7 +9D36Df9yik22wtbrNHrUxwAA +GUiocE7IkkCZw41qLNeRtgAA +5G8tfBNkRE25sTzKxZ9oYwAA +qzJwhLIvW06mKBeLQRVO7AAA +PIJHJKoe/kmx8orhOhmtNAAA +2Skiwuz5GkWTFjEw4fPRIwAA +JeeK2Y/EpUShfGb8R069/QAA +5 + +sid +string +CRn3SE8/OEiSQa/JR155QgAA + + +ip_address +string +CRn3SE8/OEiSQa/JR155QgAA + + +name +string +CRn3SE8/OEiSQa/JR155QgAA + + +job +queue +CRn3SE8/OEiSQa/JR155QgAA + + +status +boolean +CRn3SE8/OEiSQa/JR155QgAA + + + +File2 +c43YTGE/ykuIyb3S3/P5ogAA +3 + +IsPDF +PaRQOEFJOU6hbvpGNUOgSgAA +1 + +pdkReturn +boolean +xoMDU5H9yEaX7ZR3XWfy3wAA + + + +setEkstensi +PaRQOEFJOU6hbvpGNUOgSgAA +1 + +_ekstensi +string +WYud1b91BUSAsFdEN70z4AAA + + + +toPDF +PaRQOEFJOU6hbvpGNUOgSgAA +1 + +pdkReturn +void +ML/7mSL/VE+eyyw9Tq2rGQAA + + +3 ++/ZOWojQZk2BKLCHdZ2DWgAA +xq/sK7uIxEiMOapYsPv1QgAA +FDsrl1uSGkaQcirpCu9PVQAA +4 + +nama +string +PaRQOEFJOU6hbvpGNUOgSgAA + + +path +string +PaRQOEFJOU6hbvpGNUOgSgAA + + +uploader +string +PaRQOEFJOU6hbvpGNUOgSgAA + + +ekstensi +string +PaRQOEFJOU6hbvpGNUOgSgAA + + + +c43YTGE/ykuIyb3S3/P5ogAA +2 + +U3VCqUuaEkSbB7U+viPXogAA +CRn3SE8/OEiSQa/JR155QgAA + + +U3VCqUuaEkSbB7U+viPXogAA +PaRQOEFJOU6hbvpGNUOgSgAA + + + +use +c43YTGE/ykuIyb3S3/P5ogAA +2 + +False +iCw4/KVWBUmgn25nzSqQWwAA +CRn3SE8/OEiSQa/JR155QgAA + + +iCw4/KVWBUmgn25nzSqQWwAA +PaRQOEFJOU6hbvpGNUOgSgAA + + + +c43YTGE/ykuIyb3S3/P5ogAA +2 + +False +nl/s3h9nr0e0zZWFyaLUyAAA +CRn3SE8/OEiSQa/JR155QgAA + + +use +nl/s3h9nr0e0zZWFyaLUyAAA +CRn3SE8/OEiSQa/JR155QgAA + + + +use +c43YTGE/ykuIyb3S3/P5ogAA +2 + +False +lZqckHYHtE27ozEDXPfL9QAA +Je1ODxMLgU+/Wz0zKrJICwAA + + +lZqckHYHtE27ozEDXPfL9QAA +CRn3SE8/OEiSQa/JR155QgAA + + + +Printer Controller +c43YTGE/ykuIyb3S3/P5ogAA +4 +5XCtqYSKr0yLIi3jJfPCwQAA +YqE1XnKMmkic430b44vy/gAA +Rf+sfkVyJUu/grm7wxGaVgAA +6Gx761aG20yEqVVImf+regAA +1 + +print +ljPe9KCvHEKY8LGu5TiItgAA +1 + +pdkReturn +void +Y36st/fbnkua0WjTTPWHTgAA + + +2 +psv+j2u89ECSohbQSoRu8wAA +eZUuMfOOBUShvo+fTaVU5QAA + + +use +c43YTGE/ykuIyb3S3/P5ogAA +4 +TtocwmCRbkS3sgaYB6SBpQAA +4uUdAltPj02TUX6D6IPEAwAA +ppUtBMNfOUGcdIHqkDf7ZgAA +K+5/38YoVU2fBCqHg8WFuQAA +2 + +False +Mn3z7TcZBUie6mqTn2GZmgAA +ljPe9KCvHEKY8LGu5TiItgAA +4 +bvz3Gs9qp0SPYeky5Bb7/gAA +NidW7YnJGk6Q3MKquiY6mAAA +r24NQod1bkS8PUD0nbig1AAA +oN6s7eXy1UKfud1V9WXyZwAA + + +Mn3z7TcZBUie6mqTn2GZmgAA +CRn3SE8/OEiSQa/JR155QgAA +4 +54DNzwWEYUi1N+TvI6TgCAAA +jS4Ysmw5QEigr/uWy1v48gAA +jlYovEPwi0uo6/Z7OKIZIQAA +hoFxWdH++k2CLQxigU+NbwAA + + + +Job +c43YTGE/ykuIyb3S3/P5ogAA +4 +wPxO30pr7UyLjYrgi805AAAA +J5Gsvz7WnUyqoQ2BOTZsdwAA +vufbMWxqXUO7/LFA2Xhi2AAA +3EffE+C8LkWUNAr0Pw+4bgAA +3 + +addFile +dGIgqO1b+02swSmmE/PApQAA +2 + +pdkReturn +void +16ARxj+sAEmEeRR59OwgRwAA + + +_file +file +16ARxj+sAEmEeRR59OwgRwAA + + + +isFull +dGIgqO1b+02swSmmE/PApQAA +1 + +pdkReturn +boolean +FE6QYZ64skO5vzKdnjGF1wAA + + + +deleteFile +dGIgqO1b+02swSmmE/PApQAA +2 + +pdkReturn +void +O/vHlKAY1Ey9EDn8rnZpowAA + + +_file +file +O/vHlKAY1Ey9EDn8rnZpowAA + + +3 +MvR7PYVu0kygMEihyMktygAA +pKRl944T9k2YDv3nQRA0vgAA +CuiK7xWE0kO7//SGaliXEwAA +3 + +name +string +dGIgqO1b+02swSmmE/PApQAA + + +file +array of file +dGIgqO1b+02swSmmE/PApQAA + + +maximum +int +dGIgqO1b+02swSmmE/PApQAA + + + +use +c43YTGE/ykuIyb3S3/P5ogAA +2 + +False +CCy3eQaFsESLG2zw5eei6gAA +dGIgqO1b+02swSmmE/PApQAA + + +CCy3eQaFsESLG2zw5eei6gAA +PaRQOEFJOU6hbvpGNUOgSgAA + + + +use +c43YTGE/ykuIyb3S3/P5ogAA +4 +QE6XJnZT1kWcK/17JDEIowAA +Rw1oZ+AsaU6iCT0qYe/y4AAA +49qWC272ekqRRJY9dyjwtAAA +ZzjfYqwuEki/56dOKaHJwwAA +2 + +False +txQO9BTSKESXwnmbFTO6mgAA +CRn3SE8/OEiSQa/JR155QgAA +4 +Mmwn3nVSoEmExJkCkqDMmAAA +shoDPvP8fESHfSZ83+Iw1wAA +/ruifrdN8kumyHRR/pJ03AAA +bc45eoBKCUaPqeFz8Pwf6gAA + + +txQO9BTSKESXwnmbFTO6mgAA +dGIgqO1b+02swSmmE/PApQAA +4 +DkiZJz52X0qWUuE2ZMeSgwAA +8wLirRnMxUOt/Bmgm2TIhgAA +QBxerbqjGkyi1lnsXwqB0wAA +yhlzH6QsxUSGvLbJsijqJwAA + + + +File +interface +c43YTGE/ykuIyb3S3/P5ogAA +4 +VyNi5sUiO0eNOJa1s3f/tgAA +flf64DfCxk6euMr63MdgxwAA +b770a8T2SUqDbVWGpa5R8QAA +NaMYfbEtL0Wp+bJ+jB5s+AAA +3 +aa8gPGS0lkWM6dszsiYHGgAA +FpXLLeXxRE+agKHew6sDuwAA +HZaqSpPUPkOedE4rUS5nCgAA +3 + +isPDF +/xdYBoDVykyunGWHl8b9WgAA +1 + +pdkReturn +boolean +CItIc0/ov0C7jgc+Is6DCAAA + + + +setEkstensi +/xdYBoDVykyunGWHl8b9WgAA +1 + +_ekstensi +string +ZUWaBH3F1EOnKFgp/8ihwgAA + + + +toPDF +/xdYBoDVykyunGWHl8b9WgAA +1 + +pdkReturn +void +n3B097JRCUiMOrM4T31LwAAA + + +1 +OhPEPX8T7kuWWBVzhbN0QwAA + + +PDF +c43YTGE/ykuIyb3S3/P5ogAA +4 +sroAGP2EfUOIlr7nlA0x2AAA +RPpS0thMOUC0phex6y64eQAA +rtEuRBMPK0i8IIdBi2ts6gAA +E4uuTmblBkaiYl2sonCqKAAA +1 +aa8gPGS0lkWM6dszsiYHGgAA +3 + +isPDF +lXpAXMNfc0SS4TFrrcL3nwAA +1 + +pdkReturn +boolean +UIaGqSvPZUSPUWxmdqxDOgAA + + + +setEkstensi +lXpAXMNfc0SS4TFrrcL3nwAA +1 + +_ekstensi +string +sNwR7/7OJkayS0NLO8NOggAA + + + +toPDF +lXpAXMNfc0SS4TFrrcL3nwAA +1 + +pdkReturn +void +EM+hndTJTUm+o6guIxSEbgAA + + +4 + +nama +string +lXpAXMNfc0SS4TFrrcL3nwAA + + +path +string +lXpAXMNfc0SS4TFrrcL3nwAA + + +uploader +string +lXpAXMNfc0SS4TFrrcL3nwAA + + +ekstensi +string +lXpAXMNfc0SS4TFrrcL3nwAA + + + +implements +c43YTGE/ykuIyb3S3/P5ogAA +/xdYBoDVykyunGWHl8b9WgAA +lXpAXMNfc0SS4TFrrcL3nwAA +4 +Cb6zrUsDH0KBRuSpw5WBxgAA +L20GAPfQIUimIWWIDYaA9wAA +yfBr1cQxAEqW2OAVRwWPCwAA +MwsIqRVlmEGtqIJ6mtEYJAAA + + +TXT +c43YTGE/ykuIyb3S3/P5ogAA +4 +9Bao2WNfAk+cx/MKPPMtlAAA +9z834XbJEkOIuMCIUK7/dQAA +ULDOqJ+Z3kuq/VHQhYs9sgAA +WuTJKRqU8kmfhP3ABJwvFgAA +1 +FpXLLeXxRE+agKHew6sDuwAA +3 + +isPDF +8RXqfu5a50yQTA63XnhnrwAA +1 + +pdkReturn +boolean +gw5tM6Cj6U6ztT3S2pccUgAA + + + +setEkstensi +8RXqfu5a50yQTA63XnhnrwAA +1 + +_ekstensi +string +vtoFZPbH7kS3EJ9RspuSpQAA + + + +toPDF +8RXqfu5a50yQTA63XnhnrwAA +1 + +pdkReturn +void +k+PCysvkPUKBbLas82la3gAA + + +4 + +nama +string +8RXqfu5a50yQTA63XnhnrwAA + + +path +string +8RXqfu5a50yQTA63XnhnrwAA + + +ekstensi +string +8RXqfu5a50yQTA63XnhnrwAA + + +uploader +string +8RXqfu5a50yQTA63XnhnrwAA + + + +DOC +c43YTGE/ykuIyb3S3/P5ogAA +4 +/CU4qQ37sUG+5iljBc7wgAAA +jHRdELdVUk2MKBlsXdwucAAA +lTzITDGTlUuABDrh8A2UIQAA +fwaXNmr30UecdACKavfE9AAA +1 +HZaqSpPUPkOedE4rUS5nCgAA +3 + +isPDF +fyqgrHltbE29Uivkx/EvHQAA +1 + +pdkReturn +boolean +5SWoE9x250OI2PnvjtnpTwAA + + + +setEkstensi +fyqgrHltbE29Uivkx/EvHQAA +1 + +_ekstensi +string +h44ML3Wdb0+UiQb1NqF0+gAA + + + +toPDF +fyqgrHltbE29Uivkx/EvHQAA +1 + +pdkReturn +void +M7fqXIGdNUSzSTzZ0vs2CwAA + + +4 + +nama +string +fyqgrHltbE29Uivkx/EvHQAA + + +path +string +fyqgrHltbE29Uivkx/EvHQAA + + +ekstensi +string +fyqgrHltbE29Uivkx/EvHQAA + + +uploader +string +fyqgrHltbE29Uivkx/EvHQAA + + + +use +c43YTGE/ykuIyb3S3/P5ogAA +4 +ko7fzV77102z+l9KDOhJ2wAA +0D+9VduamEe+/DdnR8peIgAA +D5WezrIGxUevrGMi5IlpfwAA +bGQy2cC4uECmW1EB/1+HxQAA +2 + +False +33PYdqnf0E+uJQzrW4ZNGgAA +dGIgqO1b+02swSmmE/PApQAA +4 +H02adlEqO0e5zUEX8w05MQAA +tJ889Vu7+kGPB21wpp4D7gAA +0cpA2/NbzE21xV2tfro+ngAA +bH9nLi0K8km1UufZwcWfDwAA + + +33PYdqnf0E+uJQzrW4ZNGgAA +/xdYBoDVykyunGWHl8b9WgAA +4 +I8I/RgquDEKsxJwRhixmhQAA +MOOkCvPZ6k2Pm8uYiQDITQAA +41OADJXBI0ScArmOp9olhgAA ++JIt020cr0uu7necfPUd9QAA + + + +implements +c43YTGE/ykuIyb3S3/P5ogAA +/xdYBoDVykyunGWHl8b9WgAA +8RXqfu5a50yQTA63XnhnrwAA +4 +OSK+AowX30qDzXppwCSdZgAA +tn7UqW+ttkmhKcF7BTnelwAA +YwRHgGtGokeNrvbxVg7zlwAA +bVmP2faZR0CDG3CbkDzAowAA + + +implements +c43YTGE/ykuIyb3S3/P5ogAA +/xdYBoDVykyunGWHl8b9WgAA +fyqgrHltbE29Uivkx/EvHQAA +4 +qYPbkTZT4kmkrR3mJo6bQAAA +KMn3kh4jQEyT3C/TDRwmKgAA +VXBYbVNks0+IHMKWJm9MFAAA +hZgICdAT8EatGIRIh4I73gAA + + +use +c43YTGE/ykuIyb3S3/P5ogAA +4 +6Dj1wZSMJkSQHahL4WcjugAA +h90pxCiv3kOwujP5Wg23rgAA +rOK2H6XrWUmlnQj2B9oU6QAA +CDULUYitHE6CVdX8MJjjEgAA +2 + +False +7OrPYjkLwk+b2f4lzMAsvAAA +Je1ODxMLgU+/Wz0zKrJICwAA +4 +IM/Z+W20y0GRoWV2u/tgVAAA +5cMARDZWuE2RpUNk3VCA4wAA +2RNZmdajk0GlxTFYDcZZbAAA +j5/19FKWcEyC84JblkSabAAA + + +7OrPYjkLwk+b2f4lzMAsvAAA +ljPe9KCvHEKY8LGu5TiItgAA +4 +V1smKNkp6UGLzHepvg0WBgAA +JYRZt0CbvkWAjas8F5PI9wAA +QBrAWaixTUm18g2N0PkSVwAA +cbjlMneFB0ab11zxCWPSjQAA + + + +User +c43YTGE/ykuIyb3S3/P5ogAA +4 +T1SmD3ije0aB0jrQAjhQ9QAA +z7kTnvcRVU6GNTlrTVZmIgAA +DAYMJaIuNUO4oEba6/d0cgAA +HndXxbNGZ0aTSnoB5wJc0AAA +12 + +Pengguna +WEmomJSAJkGUGSVFLuUhRwAA + + +getName +WEmomJSAJkGUGSVFLuUhRwAA +1 + +pdkReturn +string +njHJPDCOiU67EsM5vvlNmQAA + + + +setNama +WEmomJSAJkGUGSVFLuUhRwAA +2 + +pdkReturn +void +bKULjIia9EezjGMgn2/d7wAA + + +string _nama +bKULjIia9EezjGMgn2/d7wAA + + + +getEmail +WEmomJSAJkGUGSVFLuUhRwAA +1 + +pdkReturn +string +8h3ztask+E2XkWJlHFg6aAAA + + + +setEmail +WEmomJSAJkGUGSVFLuUhRwAA +2 + +pdkReturn +void +SNdrwQBF0ke0nGaPsoRylAAA + + +string _nama +SNdrwQBF0ke0nGaPsoRylAAA + + + +getUsername +WEmomJSAJkGUGSVFLuUhRwAA +1 + +pdkReturn +string +6o4MA7tns0WGW9FDIsJHHQAA + + + +setUsername +WEmomJSAJkGUGSVFLuUhRwAA +2 + +pdkReturn +void +l7sUEnu78E6NYjLOZoaDBQAA + + +string _usermame +l7sUEnu78E6NYjLOZoaDBQAA + + + +getSaldo +WEmomJSAJkGUGSVFLuUhRwAA +1 + +pdkReturn +integer +H3G2rCHVzEWNiPvLEICWnwAA + + + +tambahSaldo +WEmomJSAJkGUGSVFLuUhRwAA +2 + +pdkReturn +void +8Q/YuRTrcEyVJL+0rAf4cQAA + + +int _add +8Q/YuRTrcEyVJL+0rAf4cQAA + + + +kurangiSaldo +WEmomJSAJkGUGSVFLuUhRwAA +2 + +pdkReturn +void +Nu2B1wEGcEmIX0yZAUaoMwAA + + +int _min +Nu2B1wEGcEmIX0yZAUaoMwAA + + + +gantiPassword +WEmomJSAJkGUGSVFLuUhRwAA +2 + +pdkReturn +void +9wf0YnWTC0qIsHuaRyhJZAAA + + +string _password +9wf0YnWTC0qIsHuaRyhJZAAA + + + +validasi +WEmomJSAJkGUGSVFLuUhRwAA +1 + +pdkReturn +boolean +L8dDToBpv0OrLX3cagkGVwAA + + +1 +mVhFih5/n0WDGhTXH0JN5wAA +5 + +nama +string +WEmomJSAJkGUGSVFLuUhRwAA + + +username +string +WEmomJSAJkGUGSVFLuUhRwAA + + +password +string +WEmomJSAJkGUGSVFLuUhRwAA + + +email +string +WEmomJSAJkGUGSVFLuUhRwAA + + +saldo +integer +WEmomJSAJkGUGSVFLuUhRwAA + + + +UserDao +interface +c43YTGE/ykuIyb3S3/P5ogAA +4 +TRB24MaURUmnftaJu8VduwAA +zwlFGbxLM0KcTkb2/Z9eQQAA +pq5zoZqqike7li6ITx/VPAAA +zwZlwka3RU2AX7ESO1TLygAA +6 + +getAllUser +AQo+m9pBZE+nR9cJGleY8AAA +1 + +pdkReturn +List +6uWQRKDt90WP8iyVfgZ7XgAA + + + +getByUsername +AQo+m9pBZE+nR9cJGleY8AAA +2 + +pdkReturn +user +cnmMtDpBsUOvukYZ0vYDjAAA + + +string username +cnmMtDpBsUOvukYZ0vYDjAAA + + + +Login +AQo+m9pBZE+nR9cJGleY8AAA +1 + +pdkReturn +user +ljdI3Q8t6kKYEsvIoo7jygAA + + + +updateuser +AQo+m9pBZE+nR9cJGleY8AAA +2 + +pdkReturn +void +fJCvRXtlIEidznga1jpXOAAA + + +user _user +fJCvRXtlIEidznga1jpXOAAA + + + +deleteUser +AQo+m9pBZE+nR9cJGleY8AAA +2 + +pdkReturn +void +Qxdz+nKHzkq/UJnqQhHRUgAA + + +string username +Qxdz+nKHzkq/UJnqQhHRUgAA + + + +addUser +AQo+m9pBZE+nR9cJGleY8AAA +2 + +pdkReturn +void +RW9BkHfsokKUyC/kytTOTgAA + + +User user +RW9BkHfsokKUyC/kytTOTgAA + + +2 +0h7SfuAoOUSJGu6E8vvx+AAA +fJL7/YU3Qky9aqMWQJRnAwAA + + +uses +c43YTGE/ykuIyb3S3/P5ogAA +4 +7oIpEYkxb0aLocsoq1XWbgAA +ByFSXOa6JUCXeKb+ErjZSAAA +7rN8wDIfuUe01GJtAmKCYAAA +pXrFlbJclEGKwTFmt6HwwwAA +2 + +False +UIVOqgDNgkaW1EuED+WwcwAA +AQo+m9pBZE+nR9cJGleY8AAA +4 +o0WFAF9TZ0+EfB8HemyYkAAA +DxuAZ3dhAUGvi77t8c+iLwAA +5V2J9HmgSE+i44CC1o3x3wAA +UzBA2xlLqEOUxGB09caIHQAA + + +UIVOqgDNgkaW1EuED+WwcwAA +WEmomJSAJkGUGSVFLuUhRwAA +4 +lXKLPhUdlUePXQpOArgJ/QAA +YEzF3rZ1tEq6kZdgzgfpaAAA +Z1QEowZJNU2Cx+v9nlUHswAA +jbxhynwF/kOCh/jyHCLUQAAA + + + +UserDaoImplement +c43YTGE/ykuIyb3S3/P5ogAA +4 +rrRgFdQ7lkm0GvCmZyepmwAA +1TWQKT6QREuBjRjnw4P0TAAA +KJT3+8D2nkeC058AWnFPQgAA +nlgmyZzc5k6iIVTMObW2bAAA +1 + +slPVZKNnhEC07+VE4j5QjwAA + +2 +Bo77L7Fbg0G4vCJd3IITMQAA +f0rb6WGiskiNfioDnqTl9gAA +1 + +Table +string +slPVZKNnhEC07+VE4j5QjwAA + + + +Database +c43YTGE/ykuIyb3S3/P5ogAA +4 +0DrmHK/tMUWA2bpQvMuf4AAA +1Mlzouy65UusP8aMl2oyfgAA +rox3NzgBmUupz47QnDsCkwAA +I195OCIjqkm+aexzz7S2iwAA +5 + +Database +oQkaFLMlUkm+S6E19johzwAA + + +query +oQkaFLMlUkm+S6E19johzwAA +2 + +pdkReturn +void +SoxC17iTc0K0qB7cq78AgAAA + + +String _query +SoxC17iTc0K0qB7cq78AgAAA + + + +select +oQkaFLMlUkm+S6E19johzwAA + + +update +oQkaFLMlUkm+S6E19johzwAA +1 + +pdkReturn +void +diLDZ/F8DUaIA7fIJOsI8AAA + + + +delete +oQkaFLMlUkm+S6E19johzwAA +1 + +pdkReturn +void +6fiYW4xQr0K8poKywQi7wQAA + + +1 +xGfnmrXJHEqyYV4NyWK3JAAA +4 + +server +string +oQkaFLMlUkm+S6E19johzwAA + + +user +string +oQkaFLMlUkm+S6E19johzwAA + + +password +string +oQkaFLMlUkm+S6E19johzwAA + + +DbName +string +oQkaFLMlUkm+S6E19johzwAA + + + +extends +c43YTGE/ykuIyb3S3/P5ogAA +4 +iA3mtZHZFUu2PpQNM6GG3QAA +qxSxJO+SEkG3Dhhi86elmgAA +Gn00lLUcgUuJ4s4oFlOksgAA +1bKwxehJVEOh4yllCfLlAQAA +2 + +False +EO2Z0Ie82UaemxOv5UoS/QAA +slPVZKNnhEC07+VE4j5QjwAA +4 +z3PrI/aK00WAqdRdmbKwxAAA +py6cr5dELUynVuY8ArODEwAA ++iJQICO4bU29jNC0PddLvwAA +TpWYn3fBbkenmfJzXl7kwgAA + + +EO2Z0Ie82UaemxOv5UoS/QAA +oQkaFLMlUkm+S6E19johzwAA +4 +LI5X0E+R30CvynUObVUy0QAA +vGXbynu5tkGc8taRkev1ZAAA +lBcN9fMlz0GN+fUVhGzVNwAA +Vyn6oK+K0UyTynuiXzk6owAA + + + +implements +c43YTGE/ykuIyb3S3/P5ogAA +4 +fc7OnfRYT0SCPSlDlfbOvgAA +P7hJjKeMj0aBQzkPSk3y7QAA +n81/QIWga0iIN/mKOIY4YAAA +G8pHl0lnJUWuFuUVIH95MgAA +2 + +False +y8MnAq3xy0Kgzz+8Zn0rbAAA +slPVZKNnhEC07+VE4j5QjwAA +4 +JH+S/tBQyECL0ZmbbPEL/wAA +UqCmzNqLyUiufVyRcfCcXwAA +Q2JMk1eiUk6WIbh0/YOLsgAA +KKQdfxvi10uDWkJqFDEOGwAA + + +y8MnAq3xy0Kgzz+8Zn0rbAAA +AQo+m9pBZE+nR9cJGleY8AAA +4 +7A5EPcUdKk+J3fqdqNgKsgAA +7ZTU6ThEaE6lhn7RWo6atwAA +yZWvX9XcekmdJE9/GtO6pgAA +Ct/EtKcZC0m5NDP0gbiy0QAA + + + + +Implementation Model +UMLStandard +implementationModel +zEDJUB2NaEmuzH5LO/lT3AAA +1 + +Main +cKyj5rDSOUOWBNLq07zD0QAA + +IzET9XSmKU6VKaZQKMZD5wAA + + + + +Deployment Model +UMLStandard +deploymentModel +zEDJUB2NaEmuzH5LO/lT3AAA +1 + +Main +EqDBQ42xykWMzg7hQa/s1AAA + +yDNOuIPP60CIeQ2XP33n7gAA + + + + + + diff --git a/src/client/Client.java b/src/client/Client.java new file mode 100644 index 0000000..1eda16c --- /dev/null +++ b/src/client/Client.java @@ -0,0 +1,216 @@ +package Client; + +import com.data.User; +import entity.Credential; +import entity.TransObject; +import java.io.BufferedInputStream; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.PrintWriter; +import java.net.Socket; + +public class Client { + + protected String hostName; + protected int portNumber; + protected Socket socket; + protected String input; + protected String NIM; + protected String password; + protected BufferedReader reader; + protected BufferedReader sockReader; + protected User userData; + protected boolean LoggedIn; + + public Client(String host, int port) { + LoggedIn = false; + hostName = host; + portNumber = port; + } + + public void login(String NIM, String password) { + this.NIM = NIM; + this.password = password; + try { + String tempSR; + ObjectOutputStream oos; + + socket = new Socket(hostName, portNumber); + oos = new ObjectOutputStream(socket.getOutputStream()); + sockReader = new BufferedReader(new InputStreamReader(socket.getInputStream())); + Credential obj = new Credential(NIM, password, Credential.LOGIN); + oos.writeObject(obj); + + // login with DB to be implemented + tempSR = sockReader.readLine(); + System.out.println("Message from server: " + tempSR); + if (tempSR.contains("Login sukses")) { + LoggedIn = true; + ObjectInputStream ois = new ObjectInputStream(socket.getInputStream()); + Object newObj = ois.readObject(); + if (newObj instanceof User) { + userData = (User) newObj; + } + ois.close(); + } + oos.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public void logout() { + ObjectOutputStream oos; + BufferedReader in; + LoggedIn = false; + try { + socket = new Socket(hostName, portNumber); + oos = new ObjectOutputStream(socket.getOutputStream()); + in = new BufferedReader(new InputStreamReader(socket.getInputStream())); + sockReader = new BufferedReader(new InputStreamReader(socket.getInputStream())); + + Credential obj = new Credential(NIM, password, Credential.LOGOUT); + oos.writeObject(obj); + String response = in.readLine(); + System.out.println("Message from server: " + response); + oos.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public void printRequest(String fileName) { + if (LoggedIn) { + try { + socket = new Socket(hostName, portNumber); + ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream()); + + // get and print out file name list + Credential c = new Credential(NIM, password, Credential.PRINT); + c.setFile(fileName); + oos.writeObject(c); + oos.close(); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (socket != null) { + try { + socket.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + } else { + System.out.println("Silahkan login terlebih dahulu."); + } + } + + public void sendFile(String filePath) { + //System.out.println(LoggedIn); + if (LoggedIn) { + try { + socket = new Socket(hostName, portNumber); + ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream()); + TransObject obj = new TransObject(NIM, filePath); + System.out.println(NIM); + oos.writeObject(obj); + upload(obj); + oos.close(); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (socket != null) { + try { + socket.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + } else { + System.out.println("Silahkan login terlebih dahulu."); + } + } + + public void upload(TransObject obj) { + try { + BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream())); + if (true) { + File f = new File(obj.getFileName()); + BufferedInputStream inFile = new BufferedInputStream(new FileInputStream(f)); + byte[] buf = new byte[(int) f.length()]; + inFile.read(buf); + socket.getOutputStream().write(buf); + } + //read message from server + String response = in.readLine(); + System.out.println("Message from server: " + response); + do{ + response = in.readLine(); + System.out.println(response); + }while(!response.contains("Choose")); + reader = new BufferedReader(new InputStreamReader(System.in)); + input = reader.readLine(); + + } catch (Exception e) { + System.out.println("Terjadi kesalahan dalam pengiriman"); + e.printStackTrace(); + } + } + public void sendResponse(String response){ + try{ + PrintWriter out = new PrintWriter(socket.getOutputStream(), true); + out.write(response); + out.flush(); + }catch(Exception e){ + e.printStackTrace(); + } + } + + //getter and setter + public String getHostName() { + return hostName; + } + + public int getPortNumber() { + return portNumber; + } + + public Socket getSocket() { + return socket; + } + + public String getInput() { + return input; + } + + public String getNIM() { + return NIM; + } + + public String getPassword() { + return password; + } + + public User getUserData() { + return userData; + } + + public BufferedReader getReader() { + return reader; + } + + public BufferedReader getSockReader() { + return sockReader; + } + + public boolean isLoggedIn() { + return LoggedIn; + } +} diff --git a/src/client/ConsoleClient.java b/src/client/ConsoleClient.java new file mode 100644 index 0000000..5d86d27 --- /dev/null +++ b/src/client/ConsoleClient.java @@ -0,0 +1,112 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package client; + +import Client.Client; +import java.io.BufferedReader; +import java.io.File; +import java.io.InputStreamReader; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import org.w3c.dom.Document; +import org.w3c.dom.Element; + +/** + * + * @author Gilang + */ +public class ConsoleClient extends Client { + public ConsoleClient(String host, int port) { + super(host, port); + } + + public static void main(String[] args) { + try + { + File file = new File("config.xml"); + DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + Document doc = builder.parse(file); + Element Server = (Element) doc.getElementsByTagName("server_addr").item(0); + ConsoleClient client = new ConsoleClient(Server.getTextContent(), 5432); + client.run(); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + private void run() { + try { + do { + + reader = new BufferedReader(new InputStreamReader(System.in)); + if (!LoggedIn) { + System.out.println("1. login"); + } else { + System.out.println("1. logout"); + } + System.out.println("2. upload"); + System.out.println("3. print"); + System.out.println("4. exit"); + input = reader.readLine(); + if (input.equals("login") && !LoggedIn) { + login(); + } else if (input.equals("upload")) { + sendFile(); + } else if (input.equals("print")) { + printRequest(); + } else if (input.equals("logout") && LoggedIn) { + logout(); + } + } while (!input.equals("exit")); + } catch (Exception e) { + e.printStackTrace(); + } + } + private void login() { + try { + System.out.println("Enter NIM: "); + NIM = reader.readLine(); + System.out.println("Enter password: "); + password = reader.readLine(); + super.login(NIM, password); + System.out.println("Username: " + userData.getUsername()); + System.out.println("Name: " + userData.getNama()); + System.out.println("E-mail: " + userData.getEmail()); + System.out.println("Saldo: " + userData.getSaldo()); + } catch (Exception e) { + e.printStackTrace(); + } + } + private void printRequest() { + System.out.println("Input filename: "); + try { + super.printRequest(reader.readLine()); + } catch (Exception e) { + e.printStackTrace(); + } + } + private void sendFile() { + System.out.println("Masukkan path file yang akan diupload: "); + try { + String filePath = reader.readLine(); + super.sendFile(filePath); + } catch (Exception e) { + e.printStackTrace(); + } + } + + private void sendResponse(){ + try{ + String response = reader.readLine(); + super.sendResponse(response); + }catch(Exception e){ + e.printStackTrace(); + } + } +} +// test diff --git a/src/com/data/Database.java b/src/com/data/Database.java new file mode 100644 index 0000000..792e20b --- /dev/null +++ b/src/com/data/Database.java @@ -0,0 +1,144 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.data; + +/** + * + * @author Luthfi Hamid M / 135120100 + */ +import com.mysql.jdbc.Connection; +import java.io.File; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import org.w3c.dom.*; + +public class Database { + + private String host; + private String user; + private String pass; + private String db_name; + private Connection connection; + private Statement statement; + private String where = ""; + + public Database() { + try { + File file = new File("config.xml"); + DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + Document doc = builder.parse(file); + Element Host = (Element) doc.getElementsByTagName("host").item(0); + Element User = (Element) doc.getElementsByTagName("user").item(0); + Element Pass = (Element) doc.getElementsByTagName("pass").item(0); + Element DbName = (Element) doc.getElementsByTagName("dbname").item(0); + host = Host.getTextContent(); + user = User.getTextContent(); + pass = Pass.getTextContent(); + db_name = DbName.getTextContent(); + String connectionURL = "jdbc:mysql://" + host + "/" + db_name; + Class.forName("com.mysql.jdbc.Driver").newInstance(); + connection = (Connection) DriverManager.getConnection(connectionURL, user, pass); + statement = connection.createStatement(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public void Where(String col, String comp) { + if (where == "") { + where += "WHERE " + col + "'" + comp + "'"; + } else { + where += " AND " + col + "'" + comp + "'"; + } + } + + public ResultSet Select(String Table) { + ResultSet result = null; + try { + if (where == "") { + result = statement.executeQuery("SELECT * FROM `" + Table + "`"); + } else { + result = statement.executeQuery("SELECT * FROM `" + Table + "` " + where); + where = ""; + } + } catch (Exception e) { + + } + return result; + } + + public int Insert(String Table, String Col[], String Val[]) { + String ColName = "("; + int i = 1; + for (String col : Col) { + if (i < Col.length) { + ColName += col + ","; + } else { + ColName += col + ")"; + } + i++; + } + String Values = "("; + i = 1; + for (String val : Val) { + if (i < Col.length) { + Values += "'" + val + "',"; + } else { + Values += "'" + val + "')"; + } + i++; + } + try { + return statement.executeUpdate("INSERT INTO `" + Table + "` " + ColName + " VALUES " + Values); + } catch (Exception e) { + return 0; + } + } + + public void Delete(String Table) { + try { + if (where == "") { + statement.executeUpdate("DELETE FROM `" + Table + "`"); + } else { + statement.executeUpdate("DELETE FROM `" + Table + "` " + where); + where = ""; + } + } catch (Exception e) { + + } + } + + public void Update(String Table, String Col[], String Val[]) { + try { + String set = ""; + if (Col.length == Val.length) { + for (int i = 0; i < Col.length; i++) { + if (i < Col.length - 1) { + set += Col[i] + "='" + Val[i] + "',"; + } else { + set += Col[i] + "='" + Val[i] + "'"; + } + } + if (where == "") { + statement.executeUpdate("UPDATE `" + Table + "` SET " + set); + } else { + statement.executeUpdate("UPDATE `" + Table + "` SET " + set + " " + where); + where = ""; + } + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + public static void main(String[] args) { + Database data = new Database(); + } +} diff --git a/src/com/data/OOPDB.java b/src/com/data/OOPDB.java new file mode 100644 index 0000000..e158703 --- /dev/null +++ b/src/com/data/OOPDB.java @@ -0,0 +1,154 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.data; + +import java.io.Console; +import java.sql.ResultSet; +import java.util.List; +import java.util.Scanner; + +/** + * + * @author Luthfi Hamid M / 135120100 + */ +public class OOPDB { + + /** + * @param args the command line arguments + */ + /*public static void main(String[] args) { + // TODO code application logic here + Console console = null; + Scanner in = new Scanner(System.in); + UserDao Data = new UserDaoImpl(); + String username; + String password; + String nama; + String email; + int saldo; + User user = null; + int pil; + do { + if (user != null) + { + System.out.println("Welcome, "+user.getNama()); + } + System.out.println("1. Show All User"); + System.out.println("2. Search User Name"); + System.out.println("3. Add User"); + System.out.println("4. Delete User"); + if (user != null) + { + System.out.println("5. Logout"); + System.out.println("6. Show your data"); + System.out.println("7. Update your data"); + } + else + { + System.out.println("5. Login"); + } + System.out.print("Your Choice : "); + pil = in.nextInt(); + switch (pil) + { + case 1 : + List users = Data.getAllUser(); + for (User usr : users) + { + System.out.println("#"); + usr.print(); + } + break; + case 2 : + { + System.out.print("Search : "); + username = in.next(); + User usr = Data.getByUsername(username); + if (usr != null) + { + usr.print(); + } + else + { + System.out.println("Not Found!"); + } + break; + } + case 3 : + { + System.out.print("Username : "); + username = in.next(); + System.out.print("password : "); + password = in.next(); + System.out.print("nama : "); + nama = in.next(); + System.out.print("email : "); + email = in.next(); + System.out.print("saldo : "); + saldo = in.nextInt(); + User usr = new User(username,password,nama,email,saldo); + Data.AddUser(usr); + } + break; + case 4 : + { + System.out.print("Search : "); + username = in.next(); + Data.DeleteUser(username); + } + break; + case 5 : + if (user != null) + { + user = null; + } + else + { + + System.out.print("Username : "); + username = in.next(); + System.out.print("Password : "); + password = in.next(); + System.out.println(password); + user = Data.Validate(username, password); + } + break; + case 6 : + if (user != null) + { + user.print(); + } + break; + case 7 : + { + if (user != null) + { + String c_user = user.getUsername(); + System.out.print("Username : "); + username = in.next(); + user.setUsername(username); + System.out.print("password : "); + password = in.next(); + user.setPassword(password); + System.out.print("nama : "); + nama = in.next(); + user.setNama(nama); + System.out.print("email : "); + email = in.next(); + user.setEmail(email); + System.out.print("saldo : "); + saldo = in.nextInt(); + user.setSaldo(saldo); + Data.UpdateUser(c_user, user); + } + } + break; + default : break; + } + } while (pil != 0); + } + */ +} diff --git a/src/com/data/User.java b/src/com/data/User.java new file mode 100644 index 0000000..9b50219 --- /dev/null +++ b/src/com/data/User.java @@ -0,0 +1,117 @@ +package com.data; + +import java.io.Serializable; +import java.sql.ResultSet; +import java.util.LinkedList; +import java.util.List; +import onlineprinter.Encrypt; + +/** + * + * @author Luthfi Hamid Masykuri / 135120100 + */ +public class User implements Serializable { + + private String username; + private String password; + private String nama; + private String email; + private int saldo; + private int status; + private UserLogDao Logs; + + public User() { + + } + + public User(String username, String password, String nama, String email, int saldo, int status) { + this.username = username; + this.password = Encrypt.MD5(password); + this.nama = nama; + this.email = email; + this.saldo = saldo; + this.status = status; + Logs = new UserLogDaoImpl(this); + } + + public User(ResultSet Data) { + try { + username = Data.getString("username"); + password = Data.getString("password"); + nama = Data.getString("nama"); + email = Data.getString("email"); + saldo = Data.getInt("saldo"); + status = Data.getInt("status"); + Logs = new UserLogDaoImpl(this); + } catch (Exception e) { + + } + } + + public String getUsername() { + return username; + } + + public String getPassword() { + return password; + } + + public String getNama() { + return nama; + } + + public String getEmail() { + return email; + } + + public int getSaldo() { + return saldo; + } + + public int getStatus() { + return status; + } + + public List getLog() { + return Logs.getAllLog(); + } + + public void TambahSaldo(int jumlah) { + saldo += jumlah; + UserLog Log = new UserLog(jumlah, saldo); + Logs.AddLog(Log); + } + + public void setUsername(String username) { + this.username = username; + } + + public void setPassword(String password) { + this.password = Encrypt.MD5(password); + } + + public void setNama(String nama) { + this.nama = nama; + } + + public void setEmail(String email) { + this.email = email; + } + + public void setSaldo(int saldo) { + this.saldo = saldo; + } + + public void setStatus(int status) { + this.status = status; + } + + public void print() { + System.out.println(username); + System.out.println(password); + System.out.println(nama); + System.out.println(email); + System.out.println(saldo); + System.out.println(status); + } +} diff --git a/src/com/data/UserDao.java b/src/com/data/UserDao.java new file mode 100644 index 0000000..4f39c73 --- /dev/null +++ b/src/com/data/UserDao.java @@ -0,0 +1,27 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.data; + +import java.util.List; + +/** + * + * @author Luthfi Hamid M / 135120100 + */ +public interface UserDao { + + public List getAllUser(); + + public User getByUsername(String username); + + public User Validate(String username, String pass); + + public void UpdateUser(String username, User user); + + public void DeleteUser(String username); + + public void AddUser(User user); +} diff --git a/src/com/data/UserDaoImpl.java b/src/com/data/UserDaoImpl.java new file mode 100644 index 0000000..8820280 --- /dev/null +++ b/src/com/data/UserDaoImpl.java @@ -0,0 +1,111 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.data; + +import java.sql.ResultSet; +import java.util.LinkedList; +import java.util.List; +import onlineprinter.Encrypt; + +/** + * + * @author Luthfi Hamid M / 135120100 + */ +public class UserDaoImpl extends Database implements UserDao { + + private String Table; + + public UserDaoImpl() { + Table = "user"; + } + + @Override + public List getAllUser() { + try { + ResultSet res = super.Select(Table); + boolean isExist = res.first(); + List TblUser = new LinkedList(); + while (isExist) { + User user = new User(res); + TblUser.add(user); + isExist = res.next(); + } + return TblUser; + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + + @Override + public User getByUsername(String username) { + try { + super.Where("username = ", username); + ResultSet res = super.Select(Table); + if (res.first()) { + User user = new User(res); + return user; + } else { + return null; + } + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + + @Override + public User Validate(String username, String pass) { + try { + super.Where("username = ", username); + super.Where("password = ", Encrypt.MD5(pass)); + ResultSet res = super.Select(Table); + if (res.first()) { + User user = new User(res); + return user; + } else { + return null; + } + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + + @Override + public void UpdateUser(String username, User user) { + super.Where("username = ", username); + String col[] = {"username", "password", "nama", "email", "saldo", "status"}; + String val[] = new String[6]; + val[0] = user.getUsername(); + val[1] = user.getPassword(); + val[2] = user.getNama(); + val[3] = user.getEmail(); + val[4] = "" + user.getSaldo(); + val[5] = "" + user.getStatus(); + super.Update(Table, col, val); + } + + @Override + public void DeleteUser(String username) { + super.Where("username = ", username); + super.Delete(Table); + } + + @Override + public void AddUser(User user) { + String col[] = {"username", "password", "nama", "email", "saldo", "status"}; + String val[] = new String[5]; + val[0] = user.getUsername(); + val[1] = user.getPassword(); + val[2] = user.getNama(); + val[3] = user.getEmail(); + val[4] = "" + user.getSaldo(); + val[5] = "" + user.getStatus(); + int hasil = super.Insert(Table, col, val); + } + +} diff --git a/src/com/data/UserLog.java b/src/com/data/UserLog.java new file mode 100644 index 0000000..2273ee3 --- /dev/null +++ b/src/com/data/UserLog.java @@ -0,0 +1,60 @@ +package com.data; + +import java.sql.Date; +import java.sql.ResultSet; +import java.sql.Time; + +/** + * + * @author Luthfi Hamid Masykuri / 13512100 + */ +public class UserLog { + + private int ID; + private Date Tanggal; + private Time Waktu; + private int Debet; + private int Kuota; + + public UserLog(int Debet, int Kuota) { + this.ID = 0; + java.util.Calendar cal = java.util.Calendar.getInstance(); + java.util.Date utilDate = cal.getTime(); + this.Tanggal = new Date(utilDate.getDate()); + this.Waktu = new Time(utilDate.getTime()); + this.Debet = Debet; + this.Kuota = Kuota; + } + + public UserLog(ResultSet Data) { + try { + ID = Data.getInt("id"); + Tanggal = Data.getDate("tanggal"); + Waktu = Data.getTime("waktu"); + Debet = Data.getInt("debet"); + Kuota = Data.getInt("kuota"); + } catch (Exception e) { + + } + } + + public int getID() { + return ID; + } + + public Date getDate() { + return Tanggal; + } + + public Time getTime() { + return Waktu; + } + + public int getDebet() { + return Debet; + } + + public int getKuota() { + return Kuota; + } +} diff --git a/src/com/data/UserLogDao.java b/src/com/data/UserLogDao.java new file mode 100644 index 0000000..cee871d --- /dev/null +++ b/src/com/data/UserLogDao.java @@ -0,0 +1,15 @@ +package com.data; + +import java.util.List; + +/** + * + * @author Luthfi Hamid Masykuri / 13512100 + */ +public interface UserLogDao { + + public List getAllLog(); + + public void AddLog(UserLog Log); + +} diff --git a/src/com/data/UserLogDaoImpl.java b/src/com/data/UserLogDaoImpl.java new file mode 100644 index 0000000..f1889e6 --- /dev/null +++ b/src/com/data/UserLogDaoImpl.java @@ -0,0 +1,53 @@ +package com.data; + +import java.io.Serializable; +import java.sql.ResultSet; +import java.util.LinkedList; +import java.util.List; + +/** + * + * @author Luthfi Hamid Masykuri / 13512100 + */ +public class UserLogDaoImpl extends Database implements UserLogDao, Serializable { + + private String Table; + private String Username; + + public UserLogDaoImpl(User user) { + Table = "log"; + assert (user != null); + Username = user.getUsername(); + } + + @Override + public List getAllLog() { + super.Where("username = ", Username); + try { + ResultSet res = super.Select(Table); + boolean isExist = res.first(); + List Logs = new LinkedList(); + while (isExist) { + UserLog log = new UserLog(res); + Logs.add(log); + isExist = res.next(); + } + return Logs; + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + + @Override + public void AddLog(UserLog Log) { + String col[] = {"username", "tanggal", "waktu", "debet", "kuota"}; + String val[] = new String[6]; + val[0] = Username; + val[1] = Log.getDate().toString(); + val[2] = Log.getTime().toString(); + val[3] = "" + Log.getDebet(); + val[4] = "" + Log.getKuota(); + int hasil = super.Insert(Table, col, val); + } +} diff --git a/src/entity/Credential.java b/src/entity/Credential.java new file mode 100644 index 0000000..c649af1 --- /dev/null +++ b/src/entity/Credential.java @@ -0,0 +1,44 @@ +package entity; + +import java.io.Serializable; + +public class Credential implements Serializable { + + private static final long serialVersionUID = -5227294909324983861L; + + public static final int LOGIN = 0; + public static final int LOGOUT = 1; + public static final int PRINT = 2; + + private String id; + private String password; + private String fileName; + private int type; + + public Credential(String id, String password, int type) { + this.id = id; + this.password = password; + this.type = type; + } + + public void setFile(String fileName) { + this.fileName = fileName; + } + + public String getId() { + return id; + } + + public String getPassword() { + return password; + } + + public String getFile() { + return fileName; + } + + public int getType() { + return type; + } + +} diff --git a/src/entity/TransObject.java b/src/entity/TransObject.java new file mode 100644 index 0000000..ebc5fe1 --- /dev/null +++ b/src/entity/TransObject.java @@ -0,0 +1,39 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package entity; + +import java.io.Serializable; + +/** + * + * @author Gilang + */ +public class TransObject implements Serializable { + + private static final long serialVersionUID = -4630977808690959143L; + + private String senderNIM; + private String fileName; + private String extension; + + public TransObject(String senderNIM, String fileName) { + this.fileName = fileName; + this.senderNIM = senderNIM; + } + + public String getSenderNIM() { + return senderNIM; + } + + public String getFileName() { + return fileName; + } + + public String getExtension() { + return extension; + } + +} diff --git a/src/file/DOC.java b/src/file/DOC.java new file mode 100644 index 0000000..e133536 --- /dev/null +++ b/src/file/DOC.java @@ -0,0 +1,58 @@ +package file; + +import java.awt.print.PrinterException; +import java.awt.print.PrinterJob; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.Scanner; +import javax.print.PrintService; +import javax.print.PrintServiceLookup; + +import org.apache.poi.xwpf.converter.pdf.PdfConverter; +import org.apache.poi.xwpf.converter.pdf.PdfOptions; +import org.apache.poi.xwpf.usermodel.XWPFDocument; +import static printer.PrinterController.printPDF; + +/** + * + * @author Mamat Rahmat / 135120007 + */ +public class DOC extends MyFile { + + public boolean isPDF() { + return false; + } + + public void setEkstensi(String _ekstensi) { + ekstensi = _ekstensi; + + } + + public void toPDF() { + try { + // 1) Load DOCX into XWPFDocument + InputStream is = new FileInputStream(new File("serverFolder/" + uploader + "/" + path)); + XWPFDocument document = new XWPFDocument(is); + + // 2) Prepare Pdf options + PdfOptions options = PdfOptions.create(); + + // 3) Convert XWPFDocument to Pdf + OutputStream out = new FileOutputStream(new File("serverFolder/" + uploader + "/" + path + ".pdf")); + PdfConverter.getInstance().convert(document, out, options); + + } catch (Throwable e) { + e.printStackTrace(); + } + } + + public void print(javax.print.PrintService service) throws IOException, PrinterException { + toPDF(); + PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null, null); + printPDF("serverFolder/" + uploader + "/" + path + ".pdf", printServices[4]); + } +} diff --git a/src/file/FileFactory.java b/src/file/FileFactory.java new file mode 100644 index 0000000..4418ae5 --- /dev/null +++ b/src/file/FileFactory.java @@ -0,0 +1,28 @@ +package file; + +import file.MyFile; +import file.PDF; +import file.TXT; +import file.DOC; + +/** + * + * @author Mamat Rahmat / 135120007 + */ +public class FileFactory { + + public MyFile getFile(String fileType) { + if (fileType == null) { + return null; + } + if (fileType.equalsIgnoreCase("pdf")) { + return new PDF(); + } else if (fileType.equalsIgnoreCase("TXT")) { + return new TXT(); + } else if (fileType.equalsIgnoreCase("DOC")) { + return new DOC(); + } + + return null; + } +} diff --git a/src/file/MyFile.java b/src/file/MyFile.java new file mode 100644 index 0000000..2103758 --- /dev/null +++ b/src/file/MyFile.java @@ -0,0 +1,26 @@ +package file; + +import java.awt.print.PrinterException; +import java.io.IOException; +import javax.print.PrintService; + +/** + * + * @author Mamat Rahmat / 135120007 + */ +public abstract class MyFile { + + public String nama; + public String path; + public String uploader; + public String ekstensi; + + public abstract boolean isPDF(); + + public abstract void setEkstensi(String _ekstensi); + + public abstract void toPDF(); + + public abstract void print(PrintService service) throws IOException, PrinterException; + +} diff --git a/src/file/PDF.java b/src/file/PDF.java new file mode 100644 index 0000000..1da8dcd --- /dev/null +++ b/src/file/PDF.java @@ -0,0 +1,46 @@ +package file; + +import java.awt.print.PrinterException; +import java.awt.print.PrinterJob; +import java.io.IOException; +import java.lang.ProcessBuilder.Redirect.Type; +import java.util.Scanner; +import javax.print.PrintService; +import javax.print.PrintServiceLookup; +import javax.print.event.PrintServiceAttributeListener; +import org.apache.pdfbox.pdmodel.PDDocument; +import static printer.PrinterController.printPDF; + +/** + * + * @author Mamat Rahmat / 135120007 + */ +public class PDF extends MyFile { + + public boolean isPDF() { + return true; + } + + public void setEkstensi(String _ekstensi) { + /* + if(super.nama.contains(".txt")){ + super.ekstensi = "TXT"; + }else if(nama.contains(".pdf")){ + super.ekstensi = "PDF"; + }else{ + super.ekstensi = "DOC"; + } + */ + ekstensi = _ekstensi; + } + + public void toPDF() { + + } + + public void print(PrintService service) throws IOException, PrinterException { + // TODO code application logic here + PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null, null); + printPDF("serverFolder/" + uploader + "/" + path, printServices[4]); + } +} diff --git a/src/file/TXT.java b/src/file/TXT.java new file mode 100644 index 0000000..a553cf2 --- /dev/null +++ b/src/file/TXT.java @@ -0,0 +1,125 @@ +package file; + +import java.io.BufferedReader; +import java.io.DataInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; + +import com.itextpdf.text.Document; +import com.itextpdf.text.Element; +import com.itextpdf.text.Font; +import com.itextpdf.text.Paragraph; +import com.itextpdf.text.pdf.PdfWriter; +import java.awt.print.PrinterException; +import java.awt.print.PrinterJob; +import java.util.Scanner; +import javax.print.PrintService; +import javax.print.PrintServiceLookup; +import static printer.PrinterController.printPDF; + +/** + * + * @author Mamat Rahmat / 135120007 + */ +public class TXT extends MyFile { + + public boolean isPDF() { + return false; + } + + public void setEkstensi(String _ekstensi) { + ekstensi = _ekstensi; + + } + + public void toPDF() { + FileInputStream fis = null; + DataInputStream in = null; + InputStreamReader isr = null; + BufferedReader br = null; + + try { + File file = new File("serverFolder/" + uploader + "/" + path); + Document pdfDoc = new Document(); + String output_file = "serverFolder/" + uploader + "/" + path + ".pdf"; + PdfWriter writer = PdfWriter.getInstance(pdfDoc, new FileOutputStream(output_file)); + pdfDoc.open(); + pdfDoc.setMarginMirroring(true); + pdfDoc.setMargins(36, 72, 108, 180); + pdfDoc.topMargin(); + Font myfont = new Font(); + Font bold_font = new Font(); + bold_font.setStyle(Font.BOLD); + bold_font.setSize(10); + myfont.setStyle(Font.NORMAL); + myfont.setSize(10); + pdfDoc.add(new Paragraph("\n")); + + if (file.exists()) { + + fis = new FileInputStream(file); + in = new DataInputStream(fis); + isr = new InputStreamReader(in); + br = new BufferedReader(isr); + String strLine; + + while ((strLine = br.readLine()) != null) { + + Paragraph para = new Paragraph(strLine + "\n", myfont); + para.setAlignment(Element.ALIGN_JUSTIFIED); + pdfDoc.add(para); + } + } else { + + System.out.println("no such file exists!"); + } + pdfDoc.close(); + } catch (Exception e) { + System.out.println("Exception: " + e.getMessage()); + } finally { + + if (br != null) { + try { + br.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + if (fis != null) { + try { + fis.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + if (in != null) { + try { + in.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + if (isr != null) { + try { + isr.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + } + } + + public void print(javax.print.PrintService service) throws IOException, PrinterException { + toPDF(); + PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null, null); + printPDF("serverFolder/" + uploader + "/" + path + ".pdf", printServices[4]); + } +} diff --git a/src/gui/AdminIndex.form b/src/gui/AdminIndex.form new file mode 100644 index 0000000..f10a346 --- /dev/null +++ b/src/gui/AdminIndex.form @@ -0,0 +1,505 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title/> + <Editor/> + <Renderer/> + </Column> + </TableColumnModel> + </Property> + <Property name="gridColor" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="selectionBackground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="cf" red="cf" type="rgb"/> + </Property> + <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> + <TableHeader reorderingAllowed="true" resizingAllowed="true"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="jButton3"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Check Print ID"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[120, 17]"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton3MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="560" y="225" width="160" height="30"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="97" y="234" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel10"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/gui/bg2.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="810" height="600"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/src/gui/AdminIndex.java b/src/gui/AdminIndex.java new file mode 100644 index 0000000..ba4b9b2 --- /dev/null +++ b/src/gui/AdminIndex.java @@ -0,0 +1,368 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package gui; + +import gui.Login; + +/** + * + * @author Rosi + */ +public class AdminIndex extends javax.swing.JFrame { + + /** + * Creates new form User + */ + public AdminIndex() { + initComponents(); + this.setLocationRelativeTo(null); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jButton6 = new javax.swing.JButton(); + jLabel2 = new javax.swing.JLabel(); + jButton5 = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + jButton1 = new javax.swing.JButton(); + jButton4 = new javax.swing.JButton(); + jButton2 = new javax.swing.JButton(); + jScrollPane1 = new javax.swing.JScrollPane(); + jTable1 = new javax.swing.JTable(); + jButton3 = new javax.swing.JButton(); + jLabel6 = new javax.swing.JLabel(); + jLabel10 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("ITB Printing Service"); + setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + setMinimumSize(new java.awt.Dimension(800, 600)); + setResizable(false); + getContentPane().setLayout(null); + + jButton6.setBackground(new java.awt.Color(138, 138, 255)); + jButton6.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton6.setForeground(new java.awt.Color(255, 255, 255)); + jButton6.setText("Cek log lengkap"); + jButton6.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton6.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton6.setPreferredSize(new java.awt.Dimension(140, 23)); + jButton6.setRolloverEnabled(false); + jButton6.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton6MouseClicked(evt); + } + }); + jButton6.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton6ActionPerformed(evt); + } + }); + getContentPane().add(jButton6); + jButton6.setBounds(560, 183, 160, 30); + + jLabel2.setFont(new java.awt.Font("Segoe UI", 1, 11)); // NOI18N + jLabel2.setText("Log terbaru"); + getContentPane().add(jLabel2); + jLabel2.setBounds(80, 120, 70, 15); + + jButton5.setBackground(new java.awt.Color(255, 255, 255)); + jButton5.setFont(new java.awt.Font("Segoe UI", 0, 32)); // NOI18N + jButton5.setForeground(new java.awt.Color(255, 255, 255)); + jButton5.setText("ITB Printing Service"); + jButton5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(99, 99, 194))); + jButton5.setBorderPainted(false); + jButton5.setContentAreaFilled(false); + jButton5.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton5.setFocusPainted(false); + jButton5.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton5MouseClicked(evt); + } + }); + jButton5.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton5ActionPerformed(evt); + } + }); + getContentPane().add(jButton5); + jButton5.setBounds(-10, 0, 340, 50); + + jLabel1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel1.setText("Admin Teknik Tenaga Listrik"); + getContentPane().add(jLabel1); + jLabel1.setBounds(423, 30, 150, 15); + + jButton1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton1.setForeground(new java.awt.Color(255, 255, 255)); + jButton1.setText("Logout"); + jButton1.setBorder(null); + jButton1.setContentAreaFilled(false); + jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton1MouseClicked(evt); + } + }); + getContentPane().add(jButton1); + jButton1.setBounds(720, 30, 37, 15); + + jButton4.setBackground(new java.awt.Color(138, 138, 255)); + jButton4.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton4.setForeground(new java.awt.Color(255, 255, 255)); + jButton4.setText("Student User Management"); + jButton4.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton4.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton4.setPreferredSize(new java.awt.Dimension(140, 23)); + jButton4.setRolloverEnabled(false); + jButton4.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton4MouseClicked(evt); + } + }); + jButton4.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton4ActionPerformed(evt); + } + }); + getContentPane().add(jButton4); + jButton4.setBounds(560, 140, 160, 30); + + jButton2.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton2.setForeground(new java.awt.Color(255, 255, 255)); + jButton2.setText("Ganti password"); + jButton2.setBorder(null); + jButton2.setContentAreaFilled(false); + jButton2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton2.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton2MouseClicked(evt); + } + }); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + getContentPane().add(jButton2); + jButton2.setBounds(600, 30, 81, 15); + + jScrollPane1.setBackground(new java.awt.Color(138, 138, 255)); + jScrollPane1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(139, 139, 255))); + jScrollPane1.setFocusable(false); + jScrollPane1.setOpaque(false); + jScrollPane1.setPreferredSize(new java.awt.Dimension(452, 390)); + + jTable1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(99, 99, 194))); + jTable1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jTable1.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + {"P12345", "2014/01/01", "01:00:00", "13512666", null, null}, + {"P16969", "2014/02/02", "02:00:00", "13512696", null, null}, + {"P12666", "2014/03/03", "03:00:00", "13512174", null, null}, + {"P17045", "2014/04/04", "04:00:00", "13512555", new Boolean(true), null}, + {"P04055", "2014/05/05", "05:00:00", "13512111", new Boolean(true), null}, + {"P19696", "2014/06/06", "06:00:00", "13512088", new Boolean(true), null}, + {"P12500", "2014/07/07", "07:00:00", "13512245", new Boolean(true), new Boolean(true)}, + {"P12245", "2014/08/08", "08:00:00", "13512247", new Boolean(true), new Boolean(true)}, + {"P12247", "2014/09/09", "09:00:00", "13512666", new Boolean(true), new Boolean(true)}, + {"P12398", "2014/10/10", "10:00:00", "13512398", new Boolean(true), new Boolean(true)}, + {"P12345", "2014/01/01", "01:00:00", "13512666", new Boolean(true), new Boolean(true)}, + {"P16969", "2014/02/02", "02:00:00", "13512696", new Boolean(true), new Boolean(true)}, + {"P12666", "2014/03/03", "03:00:00", "13512174", new Boolean(true), new Boolean(true)}, + {"P17045", "2014/04/04", "04:00:00", "13512555", new Boolean(true), new Boolean(true)}, + {"P04055", "2014/05/05", "05:00:00", "13512111", new Boolean(true), new Boolean(true)}, + {"P19696", "2014/06/06", "06:00:00", "13512088", new Boolean(true), new Boolean(true)}, + {"P12500", "2014/07/07", "07:00:00", "13512245", new Boolean(true), new Boolean(true)}, + {"P12245", "2014/08/08", "08:00:00", "13512247", new Boolean(true), new Boolean(true)}, + {"P12247", "2014/09/09", "09:00:00", "13512666", new Boolean(true), new Boolean(true)}, + {"P12398", "2014/10/10", "10:00:00", "13512398", new Boolean(true), new Boolean(true)} + }, + new String [] { + "ID", "Tanggal", "Waktu", "NIM", "Dicetak", "Diambil" + } + ) { + Class[] types = new Class [] { + java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Boolean.class, java.lang.Boolean.class + }; + boolean[] canEdit = new boolean [] { + false, false, false, false, false, true + }; + + public Class getColumnClass(int columnIndex) { + return types [columnIndex]; + } + + public boolean isCellEditable(int rowIndex, int columnIndex) { + return canEdit [columnIndex]; + } + }); + jTable1.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_ALL_COLUMNS); + jTable1.setGridColor(new java.awt.Color(138, 138, 255)); + jTable1.setSelectionBackground(new java.awt.Color(207, 207, 255)); + jScrollPane1.setViewportView(jTable1); + if (jTable1.getColumnModel().getColumnCount() > 0) { + jTable1.getColumnModel().getColumn(0).setResizable(false); + jTable1.getColumnModel().getColumn(1).setResizable(false); + jTable1.getColumnModel().getColumn(2).setResizable(false); + jTable1.getColumnModel().getColumn(3).setResizable(false); + jTable1.getColumnModel().getColumn(4).setResizable(false); + jTable1.getColumnModel().getColumn(5).setResizable(false); + } + + getContentPane().add(jScrollPane1); + jScrollPane1.setBounds(80, 140, 440, 342); + + jButton3.setBackground(new java.awt.Color(138, 138, 255)); + jButton3.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton3.setForeground(new java.awt.Color(255, 255, 255)); + jButton3.setText("Check Print ID"); + jButton3.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton3.setPreferredSize(new java.awt.Dimension(120, 17)); + jButton3.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton3MouseClicked(evt); + } + }); + jButton3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton3ActionPerformed(evt); + } + }); + getContentPane().add(jButton3); + jButton3.setBounds(560, 225, 160, 30); + + jLabel6.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + getContentPane().add(jLabel6); + jLabel6.setBounds(97, 234, 0, 0); + + jLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/bg2.png"))); // NOI18N + getContentPane().add(jLabel10); + jLabel10.setBounds(0, 0, 810, 600); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton4ActionPerformed + + private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton3ActionPerformed + + private void jButton3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton3MouseClicked + // TODO add your handling code here: + this.hide(); + Print print = new Print(); + print.show(); + }//GEN-LAST:event_jButton3MouseClicked + + private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton5ActionPerformed + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton2ActionPerformed + + private void jButton5MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton5MouseClicked + // TODO add your handling code here: + this.hide(); + AdminIndex user = new AdminIndex(); + user.show(); + }//GEN-LAST:event_jButton5MouseClicked + + private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked + // TODO add your handling code here: + this.hide(); + Login login = new Login(); + login.show(); + }//GEN-LAST:event_jButton1MouseClicked + + private void jButton4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton4MouseClicked + // TODO add your handling code here: + this.hide(); + EnterNIM enternim = new EnterNIM(); + enternim.show(); + }//GEN-LAST:event_jButton4MouseClicked + + private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2MouseClicked + // TODO add your handling code here: + this.hide(); + ChangePasswordAdmin cpassmin = new ChangePasswordAdmin(); + cpassmin.show(); + }//GEN-LAST:event_jButton2MouseClicked + + private void jButton6MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton6MouseClicked + // TODO add your handling code here: + this.hide(); + FullLogs fulllogs = new FullLogs(); + fulllogs.show(); + }//GEN-LAST:event_jButton6MouseClicked + + private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton6ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(AdminIndex.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(AdminIndex.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(AdminIndex.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(AdminIndex.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new AdminIndex().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JButton jButton3; + private javax.swing.JButton jButton4; + private javax.swing.JButton jButton5; + private javax.swing.JButton jButton6; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel10; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel6; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JTable jTable1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/gui/ChangePassword.form b/src/gui/ChangePassword.form new file mode 100644 index 0000000..0fc22d7 --- /dev/null +++ b/src/gui/ChangePassword.form @@ -0,0 +1,278 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="ITB Printing Service"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Default Cursor"/> + </Property> + <Property name="locationByPlatform" type="boolean" value="true"/> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[800, 600]"/> + </Property> + <Property name="name" type="java.lang.String" value="ITB Printing Service" noResource="true"/> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,88,0,0,3,32"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Ganti password"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="370" y="230" width="90" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Logout"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="null"/> + </Property> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton2MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="720" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton6"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Ganti password"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="null"/> + </Property> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton6MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton6ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="600" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel8"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Rosiana Rozi (13512666)"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="450" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JPasswordField" name="formNewPass"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="New password"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="66" red="66" type="rgb"/> + </LineBorder> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="formNewPassFocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="formNewPassFocusLost"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="formNewPassMouseClicked"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="336" y="320" width="151" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton5"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="32" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="ITB Printing Service"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="c2" green="63" red="63" type="rgb"/> + </LineBorder> + </Border> + </Property> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="focusPainted" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="-10" y="0" width="340" height="50"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JTextField" name="formNIM"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="NIM"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="66" red="66" type="rgb"/> + </LineBorder> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="formNIMFocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="formNIMFocusLost"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="formNIMMouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="formNIMActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="336" y="264" width="151" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JPasswordField" name="formOldPass"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Old password"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="66" red="66" type="rgb"/> + </LineBorder> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="formOldPassFocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="formOldPassFocusLost"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="formOldPassMouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="formOldPassActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="336" y="292" width="151" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="buttonSubmit"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="OK"/> + <Property name="alignmentX" type="float" value="0.5"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[50, 25]"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="buttonSubmitMouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonSubmitActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="390" y="360" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/gui/bg2.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="800" height="600"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/src/gui/ChangePassword.java b/src/gui/ChangePassword.java new file mode 100644 index 0000000..7bbb1bf --- /dev/null +++ b/src/gui/ChangePassword.java @@ -0,0 +1,342 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package gui; + +import gui.Login; +import com.data.UserDao; +import com.data.UserDaoImpl; +import javax.swing.JOptionPane; + +/** + * + * @author Rosi + */ +public class ChangePassword extends javax.swing.JFrame { + + /** + * Creates new form SistemCetakGUI + */ + public ChangePassword() { + initComponents(); + this.setLocationRelativeTo(null); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jLabel2 = new javax.swing.JLabel(); + jButton2 = new javax.swing.JButton(); + jButton6 = new javax.swing.JButton(); + jLabel8 = new javax.swing.JLabel(); + formNewPass = new javax.swing.JPasswordField(); + jButton5 = new javax.swing.JButton(); + formNIM = new javax.swing.JTextField(); + formOldPass = new javax.swing.JPasswordField(); + buttonSubmit = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("ITB Printing Service"); + setBackground(new java.awt.Color(255, 255, 255)); + setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + setLocationByPlatform(true); + setMinimumSize(new java.awt.Dimension(800, 600)); + setName("ITB Printing Service"); // NOI18N + setResizable(false); + getContentPane().setLayout(null); + + jLabel2.setFont(new java.awt.Font("Segoe UI", 1, 11)); // NOI18N + jLabel2.setText("Ganti password"); + getContentPane().add(jLabel2); + jLabel2.setBounds(370, 230, 90, 15); + + jButton2.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton2.setForeground(new java.awt.Color(255, 255, 255)); + jButton2.setText("Logout"); + jButton2.setBorder(null); + jButton2.setContentAreaFilled(false); + jButton2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton2.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton2MouseClicked(evt); + } + }); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + getContentPane().add(jButton2); + jButton2.setBounds(720, 30, 37, 15); + + jButton6.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton6.setForeground(new java.awt.Color(255, 255, 255)); + jButton6.setText("Ganti password"); + jButton6.setBorder(null); + jButton6.setContentAreaFilled(false); + jButton6.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton6.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton6MouseClicked(evt); + } + }); + jButton6.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton6ActionPerformed(evt); + } + }); + getContentPane().add(jButton6); + jButton6.setBounds(600, 30, 81, 15); + + jLabel8.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel8.setText("Rosiana Rozi (13512666)"); + getContentPane().add(jLabel8); + jLabel8.setBounds(450, 30, 123, 15); + + formNewPass.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + formNewPass.setText("New password"); + formNewPass.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + formNewPass.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + formNewPassFocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + formNewPassFocusLost(evt); + } + }); + formNewPass.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + formNewPassMouseClicked(evt); + } + }); + getContentPane().add(formNewPass); + formNewPass.setBounds(336, 320, 151, 22); + + jButton5.setBackground(new java.awt.Color(255, 255, 255)); + jButton5.setFont(new java.awt.Font("Segoe UI", 0, 32)); // NOI18N + jButton5.setForeground(new java.awt.Color(255, 255, 255)); + jButton5.setText("ITB Printing Service"); + jButton5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(99, 99, 194))); + jButton5.setBorderPainted(false); + jButton5.setContentAreaFilled(false); + jButton5.setFocusPainted(false); + jButton5.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton5ActionPerformed(evt); + } + }); + getContentPane().add(jButton5); + jButton5.setBounds(-10, 0, 340, 50); + + formNIM.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + formNIM.setText("NIM"); + formNIM.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + formNIM.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + formNIMFocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + formNIMFocusLost(evt); + } + }); + formNIM.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + formNIMMouseClicked(evt); + } + }); + formNIM.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + formNIMActionPerformed(evt); + } + }); + getContentPane().add(formNIM); + formNIM.setBounds(336, 264, 151, 22); + + formOldPass.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + formOldPass.setText("Old password"); + formOldPass.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + formOldPass.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + formOldPassFocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + formOldPassFocusLost(evt); + } + }); + formOldPass.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + formOldPassMouseClicked(evt); + } + }); + formOldPass.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + formOldPassActionPerformed(evt); + } + }); + getContentPane().add(formOldPass); + formOldPass.setBounds(336, 292, 151, 22); + + buttonSubmit.setBackground(new java.awt.Color(138, 138, 255)); + buttonSubmit.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + buttonSubmit.setForeground(new java.awt.Color(255, 255, 255)); + buttonSubmit.setText("OK"); + buttonSubmit.setAlignmentX(0.5F); + buttonSubmit.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + buttonSubmit.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + buttonSubmit.setPreferredSize(new java.awt.Dimension(50, 25)); + buttonSubmit.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + buttonSubmitMouseClicked(evt); + } + }); + buttonSubmit.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + buttonSubmitActionPerformed(evt); + } + }); + getContentPane().add(buttonSubmit); + buttonSubmit.setBounds(390, 360, 50, 25); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/bg2.png"))); // NOI18N + getContentPane().add(jLabel1); + jLabel1.setBounds(0, 0, 800, 600); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void formNIMActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_formNIMActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_formNIMActionPerformed + + private void buttonSubmitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSubmitActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_buttonSubmitActionPerformed + + private void buttonSubmitMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_buttonSubmitMouseClicked + // TODO add your handling code here: + + UserDao data = new UserDaoImpl(); + com.data.User userData = data.Validate(formNIM.getText(), formOldPass.getText()); + userData.print(); + if (userData != null) { + this.hide(); + userData.setPassword(formNewPass.getText()); + userData.print(); + data.UpdateUser(userData.getUsername(), userData); + User user = new User(); + user.show(); + + } else { + JOptionPane.showMessageDialog(this, "Wrong username or password!"); + } + }//GEN-LAST:event_buttonSubmitMouseClicked + + private void formNIMMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formNIMMouseClicked + // TODO add your handling code here: + formNIM.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + formNIM.setText(""); + }//GEN-LAST:event_formNIMMouseClicked + + private void formOldPassMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formOldPassMouseClicked + // TODO add your handling code here: + formOldPass.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + }//GEN-LAST:event_formOldPassMouseClicked + + private void formNIMFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_formNIMFocusGained + // TODO add your handling code here: + formNIM.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + formNIM.setText(""); + }//GEN-LAST:event_formNIMFocusGained + + private void formOldPassFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_formOldPassFocusGained + // TODO add your handling code here: + formOldPass.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + formOldPass.setText(""); + }//GEN-LAST:event_formOldPassFocusGained + + private void formNIMFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_formNIMFocusLost + // TODO add your handling code here: + formNIM.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + if (formNIM.getText().equals("")) { + formNIM.setText("Username"); + } + }//GEN-LAST:event_formNIMFocusLost + + private void formOldPassFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_formOldPassFocusLost + // TODO add your handling code here: + formOldPass.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + if (formOldPass.getText().equals("")) { + formOldPass.setText("Password"); + } + }//GEN-LAST:event_formOldPassFocusLost + + private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton5ActionPerformed + + private void formNewPassFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_formNewPassFocusGained + // TODO add your handling code here: + formNewPass.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + formNewPass.setText(""); + }//GEN-LAST:event_formNewPassFocusGained + + private void formNewPassFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_formNewPassFocusLost + // TODO add your handling code here: + formNewPass.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + if (formNewPass.getText().equals("")) { + formNewPass.setText("Password"); + } + }//GEN-LAST:event_formNewPassFocusLost + + private void formNewPassMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formNewPassMouseClicked + // TODO add your handling code here: + }//GEN-LAST:event_formNewPassMouseClicked + + private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton6ActionPerformed + + private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2MouseClicked + // TODO add your handling code here: + this.hide(); + Login login = new Login(); + login.show(); + }//GEN-LAST:event_jButton2MouseClicked + + private void jButton6MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton6MouseClicked + // TODO add your handling code here: + this.hide(); + ChangePassword cpass = new ChangePassword(); + cpass.show(); + }//GEN-LAST:event_jButton6MouseClicked + + private void formOldPassActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_formOldPassActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_formOldPassActionPerformed + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + Main.client.logout(); + }//GEN-LAST:event_jButton2ActionPerformed + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton buttonSubmit; + private javax.swing.JTextField formNIM; + private javax.swing.JPasswordField formNewPass; + private javax.swing.JPasswordField formOldPass; + private javax.swing.JButton jButton2; + private javax.swing.JButton jButton5; + private javax.swing.JButton jButton6; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel8; + // End of variables declaration//GEN-END:variables +} diff --git a/src/gui/ChangePasswordAdmin.form b/src/gui/ChangePasswordAdmin.form new file mode 100644 index 0000000..106ece3 --- /dev/null +++ b/src/gui/ChangePasswordAdmin.form @@ -0,0 +1,277 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="ITB Printing Service"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Default Cursor"/> + </Property> + <Property name="locationByPlatform" type="boolean" value="true"/> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[800, 600]"/> + </Property> + <Property name="name" type="java.lang.String" value="ITB Printing Service" noResource="true"/> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,88,0,0,3,32"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Admin Teknik Tenaga Listrik"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="423" y="30" width="150" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Ganti password"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="370" y="230" width="90" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Logout"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="null"/> + </Property> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton2MouseClicked"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="720" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton6"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Ganti password"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="null"/> + </Property> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton6MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton6ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="600" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JPasswordField" name="jPasswordField2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="New password"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="66" red="66" type="rgb"/> + </LineBorder> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jPasswordField2FocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jPasswordField2FocusLost"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jPasswordField2MouseClicked"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="336" y="320" width="151" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton5"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="32" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="ITB Printing Service"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="c2" green="63" red="63" type="rgb"/> + </LineBorder> + </Border> + </Property> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="focusPainted" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="-10" y="0" width="340" height="50"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JTextField" name="jTextField1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Username"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="66" red="66" type="rgb"/> + </LineBorder> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jTextField1FocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jTextField1FocusLost"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jTextField1MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextField1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="336" y="264" width="151" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JPasswordField" name="jPasswordField1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Old password"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="66" red="66" type="rgb"/> + </LineBorder> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jPasswordField1FocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jPasswordField1FocusLost"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jPasswordField1MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jPasswordField1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="336" y="292" width="151" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="OK"/> + <Property name="alignmentX" type="float" value="0.5"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[50, 25]"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton1MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="390" y="360" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/gui/bg2.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="800" height="600"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/src/gui/ChangePasswordAdmin.java b/src/gui/ChangePasswordAdmin.java new file mode 100644 index 0000000..9b3fa35 --- /dev/null +++ b/src/gui/ChangePasswordAdmin.java @@ -0,0 +1,318 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package gui; + +import gui.Login; + +/** + * + * @author Rosi + */ +public class ChangePasswordAdmin extends javax.swing.JFrame { + + /** + * Creates new form SistemCetakGUI + */ + public ChangePasswordAdmin() { + initComponents(); + this.setLocationRelativeTo(null); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jLabel3 = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); + jButton2 = new javax.swing.JButton(); + jButton6 = new javax.swing.JButton(); + jPasswordField2 = new javax.swing.JPasswordField(); + jButton5 = new javax.swing.JButton(); + jTextField1 = new javax.swing.JTextField(); + jPasswordField1 = new javax.swing.JPasswordField(); + jButton1 = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("ITB Printing Service"); + setBackground(new java.awt.Color(255, 255, 255)); + setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + setLocationByPlatform(true); + setMinimumSize(new java.awt.Dimension(800, 600)); + setName("ITB Printing Service"); // NOI18N + setResizable(false); + getContentPane().setLayout(null); + + jLabel3.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel3.setText("Admin Teknik Tenaga Listrik"); + getContentPane().add(jLabel3); + jLabel3.setBounds(423, 30, 150, 15); + + jLabel2.setFont(new java.awt.Font("Segoe UI", 1, 11)); // NOI18N + jLabel2.setText("Ganti password"); + getContentPane().add(jLabel2); + jLabel2.setBounds(370, 230, 90, 15); + + jButton2.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton2.setForeground(new java.awt.Color(255, 255, 255)); + jButton2.setText("Logout"); + jButton2.setBorder(null); + jButton2.setContentAreaFilled(false); + jButton2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton2.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton2MouseClicked(evt); + } + }); + getContentPane().add(jButton2); + jButton2.setBounds(720, 30, 37, 15); + + jButton6.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton6.setForeground(new java.awt.Color(255, 255, 255)); + jButton6.setText("Ganti password"); + jButton6.setBorder(null); + jButton6.setContentAreaFilled(false); + jButton6.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton6.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton6MouseClicked(evt); + } + }); + jButton6.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton6ActionPerformed(evt); + } + }); + getContentPane().add(jButton6); + jButton6.setBounds(600, 30, 81, 15); + + jPasswordField2.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jPasswordField2.setText("New password"); + jPasswordField2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + jPasswordField2.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jPasswordField2FocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + jPasswordField2FocusLost(evt); + } + }); + jPasswordField2.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jPasswordField2MouseClicked(evt); + } + }); + getContentPane().add(jPasswordField2); + jPasswordField2.setBounds(336, 320, 151, 22); + + jButton5.setBackground(new java.awt.Color(255, 255, 255)); + jButton5.setFont(new java.awt.Font("Segoe UI", 0, 32)); // NOI18N + jButton5.setForeground(new java.awt.Color(255, 255, 255)); + jButton5.setText("ITB Printing Service"); + jButton5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(99, 99, 194))); + jButton5.setBorderPainted(false); + jButton5.setContentAreaFilled(false); + jButton5.setFocusPainted(false); + jButton5.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton5ActionPerformed(evt); + } + }); + getContentPane().add(jButton5); + jButton5.setBounds(-10, 0, 340, 50); + + jTextField1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jTextField1.setText("Username"); + jTextField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + jTextField1.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTextField1FocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + jTextField1FocusLost(evt); + } + }); + jTextField1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jTextField1MouseClicked(evt); + } + }); + jTextField1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextField1ActionPerformed(evt); + } + }); + getContentPane().add(jTextField1); + jTextField1.setBounds(336, 264, 151, 22); + + jPasswordField1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jPasswordField1.setText("Old password"); + jPasswordField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + jPasswordField1.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jPasswordField1FocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + jPasswordField1FocusLost(evt); + } + }); + jPasswordField1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jPasswordField1MouseClicked(evt); + } + }); + jPasswordField1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jPasswordField1ActionPerformed(evt); + } + }); + getContentPane().add(jPasswordField1); + jPasswordField1.setBounds(336, 292, 151, 22); + + jButton1.setBackground(new java.awt.Color(138, 138, 255)); + jButton1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton1.setForeground(new java.awt.Color(255, 255, 255)); + jButton1.setText("OK"); + jButton1.setAlignmentX(0.5F); + jButton1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton1.setPreferredSize(new java.awt.Dimension(50, 25)); + jButton1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton1MouseClicked(evt); + } + }); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + getContentPane().add(jButton1); + jButton1.setBounds(390, 360, 50, 25); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/bg2.png"))); // NOI18N + getContentPane().add(jLabel1); + jLabel1.setBounds(0, 0, 800, 600); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTextField1ActionPerformed + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton1ActionPerformed + + private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked + // TODO add your handling code here: + this.hide(); + AdminIndex admindex = new AdminIndex(); + admindex.show(); + }//GEN-LAST:event_jButton1MouseClicked + + private void jTextField1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTextField1MouseClicked + // TODO add your handling code here: + jTextField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + jTextField1.setText(""); + }//GEN-LAST:event_jTextField1MouseClicked + + private void jPasswordField1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jPasswordField1MouseClicked + // TODO add your handling code here: + jPasswordField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + }//GEN-LAST:event_jPasswordField1MouseClicked + + private void jTextField1FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField1FocusGained + // TODO add your handling code here: + jTextField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + jTextField1.setText(""); + }//GEN-LAST:event_jTextField1FocusGained + + private void jPasswordField1FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jPasswordField1FocusGained + // TODO add your handling code here: + jPasswordField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + jPasswordField1.setText(""); + }//GEN-LAST:event_jPasswordField1FocusGained + + private void jTextField1FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField1FocusLost + // TODO add your handling code here: + jTextField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + if (jTextField1.getText().equals("")) { + jTextField1.setText("NIM"); + } + }//GEN-LAST:event_jTextField1FocusLost + + private void jPasswordField1FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jPasswordField1FocusLost + // TODO add your handling code here: + jPasswordField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + if (jPasswordField1.getText().equals("")) { + jPasswordField1.setText("Password"); + } + }//GEN-LAST:event_jPasswordField1FocusLost + + private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton5ActionPerformed + + private void jPasswordField2FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jPasswordField2FocusGained + // TODO add your handling code here: + jPasswordField2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + jPasswordField2.setText(""); + }//GEN-LAST:event_jPasswordField2FocusGained + + private void jPasswordField2FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jPasswordField2FocusLost + // TODO add your handling code here: + jPasswordField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + if (jPasswordField1.getText().equals("")) { + jPasswordField1.setText("Password"); + } + }//GEN-LAST:event_jPasswordField2FocusLost + + private void jPasswordField2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jPasswordField2MouseClicked + // TODO add your handling code here: + }//GEN-LAST:event_jPasswordField2MouseClicked + + private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton6ActionPerformed + + private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2MouseClicked + // TODO add your handling code here: + this.hide(); + Login login = new Login(); + login.show(); + }//GEN-LAST:event_jButton2MouseClicked + + private void jButton6MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton6MouseClicked + // TODO add your handling code here: + this.hide(); + ChangePasswordAdmin cpass = new ChangePasswordAdmin(); + cpass.show(); + }//GEN-LAST:event_jButton6MouseClicked + + private void jPasswordField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jPasswordField1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jPasswordField1ActionPerformed + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JButton jButton5; + private javax.swing.JButton jButton6; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JPasswordField jPasswordField1; + private javax.swing.JPasswordField jPasswordField2; + private javax.swing.JTextField jTextField1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/gui/ConfirmStatChange.form b/src/gui/ConfirmStatChange.form new file mode 100644 index 0000000..65c3d05 --- /dev/null +++ b/src/gui/ConfirmStatChange.form @@ -0,0 +1,135 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="title" type="java.lang.String" value="Confirm"/> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[250, 120]"/> + </Property> + <Property name="resizable" type="boolean" value="false"/> + <Property name="type" type="java.awt.Window$Type" editor="org.netbeans.modules.form.editors.EnumEditor"> + <Value id="POPUP"/> + </Property> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,0,120,0,0,0,-6"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Tidak"/> + <Property name="alignmentX" type="float" value="0.5"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="focusPainted" type="boolean" value="false"/> + <Property name="focusable" type="boolean" value="false"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[50, 25]"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton2MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="130" y="50" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Yakin ingin menonaktifkan akun ini?"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="30" y="20" width="200" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Ya"/> + <Property name="alignmentX" type="float" value="0.5"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="focusPainted" type="boolean" value="false"/> + <Property name="focusable" type="boolean" value="false"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[50, 25]"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton1MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="60" y="50" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/gui/bgpop.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="250" height="120"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/src/gui/ConfirmStatChange.java b/src/gui/ConfirmStatChange.java new file mode 100644 index 0000000..0fecfc2 --- /dev/null +++ b/src/gui/ConfirmStatChange.java @@ -0,0 +1,162 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package gui; + +/** + * + * @author Rosi + */ +public class ConfirmStatChange extends javax.swing.JFrame { + + /** + * Creates new form FileSent + */ + public ConfirmStatChange() { + initComponents(); + this.setLocationRelativeTo(null); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jButton2 = new javax.swing.JButton(); + jLabel2 = new javax.swing.JLabel(); + jButton1 = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + + setTitle("Confirm"); + setMinimumSize(new java.awt.Dimension(250, 120)); + setResizable(false); + setType(java.awt.Window.Type.POPUP); + getContentPane().setLayout(null); + + jButton2.setBackground(new java.awt.Color(138, 138, 255)); + jButton2.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton2.setForeground(new java.awt.Color(255, 255, 255)); + jButton2.setText("Tidak"); + jButton2.setAlignmentX(0.5F); + jButton2.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton2.setFocusPainted(false); + jButton2.setFocusable(false); + jButton2.setPreferredSize(new java.awt.Dimension(50, 25)); + jButton2.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton2MouseClicked(evt); + } + }); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + getContentPane().add(jButton2); + jButton2.setBounds(130, 50, 50, 25); + + jLabel2.setFont(new java.awt.Font("Segoe UI", 1, 11)); // NOI18N + jLabel2.setText("Yakin ingin menonaktifkan akun ini?"); + getContentPane().add(jLabel2); + jLabel2.setBounds(30, 20, 200, 15); + + jButton1.setBackground(new java.awt.Color(138, 138, 255)); + jButton1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton1.setForeground(new java.awt.Color(255, 255, 255)); + jButton1.setText("Ya"); + jButton1.setAlignmentX(0.5F); + jButton1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton1.setFocusPainted(false); + jButton1.setFocusable(false); + jButton1.setPreferredSize(new java.awt.Dimension(50, 25)); + jButton1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton1MouseClicked(evt); + } + }); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + getContentPane().add(jButton1); + jButton1.setBounds(60, 50, 50, 25); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/bgpop.png"))); // NOI18N + getContentPane().add(jLabel1); + jLabel1.setBounds(0, 0, 250, 120); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked + // TODO add your handling code here: + this.hide(); + StatChangeSuccess stcsuc = new StatChangeSuccess(); + stcsuc.show(); + + }//GEN-LAST:event_jButton1MouseClicked + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton1ActionPerformed + + private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2MouseClicked + // TODO add your handling code here: + this.hide(); + }//GEN-LAST:event_jButton2MouseClicked + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton2ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(ConfirmStatChange.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(ConfirmStatChange.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(ConfirmStatChange.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(ConfirmStatChange.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new ConfirmStatChange().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + // End of variables declaration//GEN-END:variables +} diff --git a/src/gui/EnterNIM.form b/src/gui/EnterNIM.form new file mode 100644 index 0000000..1e18f06 --- /dev/null +++ b/src/gui/EnterNIM.form @@ -0,0 +1,226 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="ITB Printing Service"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Default Cursor"/> + </Property> + <Property name="locationByPlatform" type="boolean" value="true"/> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[800, 600]"/> + </Property> + <Property name="name" type="java.lang.String" value="ITB Printing Service" noResource="true"/> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,88,0,0,3,32"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Admin Teknik Tenaga Listrik"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="423" y="30" width="150" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Ganti password"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="null"/> + </Property> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton2MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="600" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Logout"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="null"/> + </Property> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton3MouseClicked"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="720" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Masukkan NIM untuk mengecek status mahasiswa dan kuota."/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="260" y="250" width="330" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton5"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="32" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="ITB Printing Service"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="c2" green="63" red="63" type="rgb"/> + </LineBorder> + </Border> + </Property> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="focusPainted" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="-10" y="0" width="340" height="50"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JTextField" name="jTextField1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="NIM"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="66" red="66" type="rgb"/> + </LineBorder> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jTextField1FocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jTextField1FocusLost"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jTextField1MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextField1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="340" y="290" width="151" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Cek"/> + <Property name="alignmentX" type="float" value="0.5"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[50, 25]"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton1MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="387" y="330" width="60" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/gui/bg2.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="800" height="600"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/src/gui/EnterNIM.java b/src/gui/EnterNIM.java new file mode 100644 index 0000000..634db1b --- /dev/null +++ b/src/gui/EnterNIM.java @@ -0,0 +1,230 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package gui; + +import gui.Login; + +/** + * + * @author Rosi + */ +public class EnterNIM extends javax.swing.JFrame { + + /** + * Creates new form SistemCetakGUI + */ + public EnterNIM() { + initComponents(); + this.setLocationRelativeTo(null); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jLabel3 = new javax.swing.JLabel(); + jButton2 = new javax.swing.JButton(); + jButton3 = new javax.swing.JButton(); + jLabel2 = new javax.swing.JLabel(); + jButton5 = new javax.swing.JButton(); + jTextField1 = new javax.swing.JTextField(); + jButton1 = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("ITB Printing Service"); + setBackground(new java.awt.Color(255, 255, 255)); + setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + setLocationByPlatform(true); + setMinimumSize(new java.awt.Dimension(800, 600)); + setName("ITB Printing Service"); // NOI18N + setResizable(false); + getContentPane().setLayout(null); + + jLabel3.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel3.setText("Admin Teknik Tenaga Listrik"); + getContentPane().add(jLabel3); + jLabel3.setBounds(423, 30, 150, 15); + + jButton2.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton2.setForeground(new java.awt.Color(255, 255, 255)); + jButton2.setText("Ganti password"); + jButton2.setBorder(null); + jButton2.setContentAreaFilled(false); + jButton2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton2.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton2MouseClicked(evt); + } + }); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + getContentPane().add(jButton2); + jButton2.setBounds(600, 30, 81, 15); + + jButton3.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton3.setForeground(new java.awt.Color(255, 255, 255)); + jButton3.setText("Logout"); + jButton3.setBorder(null); + jButton3.setContentAreaFilled(false); + jButton3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton3.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton3MouseClicked(evt); + } + }); + getContentPane().add(jButton3); + jButton3.setBounds(720, 30, 37, 15); + + jLabel2.setFont(new java.awt.Font("Segoe UI", 1, 11)); // NOI18N + jLabel2.setText("Masukkan NIM untuk mengecek status mahasiswa dan kuota."); + getContentPane().add(jLabel2); + jLabel2.setBounds(260, 250, 330, 15); + + jButton5.setBackground(new java.awt.Color(255, 255, 255)); + jButton5.setFont(new java.awt.Font("Segoe UI", 0, 32)); // NOI18N + jButton5.setForeground(new java.awt.Color(255, 255, 255)); + jButton5.setText("ITB Printing Service"); + jButton5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(99, 99, 194))); + jButton5.setBorderPainted(false); + jButton5.setContentAreaFilled(false); + jButton5.setFocusPainted(false); + jButton5.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton5ActionPerformed(evt); + } + }); + getContentPane().add(jButton5); + jButton5.setBounds(-10, 0, 340, 50); + + jTextField1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jTextField1.setText("NIM"); + jTextField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + jTextField1.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTextField1FocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + jTextField1FocusLost(evt); + } + }); + jTextField1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jTextField1MouseClicked(evt); + } + }); + jTextField1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextField1ActionPerformed(evt); + } + }); + getContentPane().add(jTextField1); + jTextField1.setBounds(340, 290, 151, 22); + + jButton1.setBackground(new java.awt.Color(138, 138, 255)); + jButton1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton1.setForeground(new java.awt.Color(255, 255, 255)); + jButton1.setText("Cek"); + jButton1.setAlignmentX(0.5F); + jButton1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton1.setPreferredSize(new java.awt.Dimension(50, 25)); + jButton1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton1MouseClicked(evt); + } + }); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + getContentPane().add(jButton1); + jButton1.setBounds(387, 330, 60, 25); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/bg2.png"))); // NOI18N + getContentPane().add(jLabel1); + jLabel1.setBounds(0, 0, 800, 600); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTextField1ActionPerformed + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton1ActionPerformed + + private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked + // TODO add your handling code here: + this.hide(); + UserManagement usman = new UserManagement(); + usman.show(); + }//GEN-LAST:event_jButton1MouseClicked + + private void jTextField1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTextField1MouseClicked + // TODO add your handling code here: + jTextField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + jTextField1.setText(""); + }//GEN-LAST:event_jTextField1MouseClicked + + private void jTextField1FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField1FocusGained + // TODO add your handling code here: + jTextField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + jTextField1.setText(""); + }//GEN-LAST:event_jTextField1FocusGained + + private void jTextField1FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField1FocusLost + // TODO add your handling code here: + jTextField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + if (jTextField1.getText().equals("")) { + jTextField1.setText("NIM"); + } + }//GEN-LAST:event_jTextField1FocusLost + + private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton5ActionPerformed + + private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2MouseClicked + // TODO add your handling code here: + this.hide(); + ChangePasswordAdmin cpassmin = new ChangePasswordAdmin(); + cpassmin.show(); + }//GEN-LAST:event_jButton2MouseClicked + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton2ActionPerformed + + private void jButton3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton3MouseClicked + // TODO add your handling code here: + this.hide(); + Login login = new Login(); + login.show(); + }//GEN-LAST:event_jButton3MouseClicked + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JButton jButton3; + private javax.swing.JButton jButton5; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JTextField jTextField1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/gui/FileDialog.form b/src/gui/FileDialog.form new file mode 100644 index 0000000..a613320 --- /dev/null +++ b/src/gui/FileDialog.form @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JDialogFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="2"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="fc" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="fc" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JFileChooser" name="fc"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="fcActionPerformed"/> + </Events> + </Component> + </SubComponents> +</Form> diff --git a/src/gui/FileDialog.java b/src/gui/FileDialog.java new file mode 100644 index 0000000..a6eef47 --- /dev/null +++ b/src/gui/FileDialog.java @@ -0,0 +1,110 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package gui; + +/** + * + * @author Gilang + */ +public class FileDialog extends javax.swing.JDialog { + + /** + * Creates new form FileDialog + */ + public FileDialog(java.awt.Frame parent, boolean modal) { + super(parent, modal); + initComponents(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + fc = new javax.swing.JFileChooser(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + + fc.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + fcActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(fc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(fc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE)) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void fcActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fcActionPerformed + Upload.file = fc.getSelectedFile(); + Upload.path = Upload.file.getAbsolutePath(); + hide(); + }//GEN-LAST:event_fcActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(FileDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(FileDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(FileDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(FileDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the dialog */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + FileDialog dialog = new FileDialog(new javax.swing.JFrame(), true); + dialog.addWindowListener(new java.awt.event.WindowAdapter() { + @Override + public void windowClosing(java.awt.event.WindowEvent e) { + System.exit(0); + } + }); + dialog.setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JFileChooser fc; + // End of variables declaration//GEN-END:variables +} diff --git a/src/gui/FileSent.form b/src/gui/FileSent.form new file mode 100644 index 0000000..2f97f27 --- /dev/null +++ b/src/gui/FileSent.form @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="title" type="java.lang.String" value="File sent"/> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[250, 120]"/> + </Property> + <Property name="resizable" type="boolean" value="false"/> + <Property name="type" type="java.awt.Window$Type" editor="org.netbeans.modules.form.editors.EnumEditor"> + <Value id="POPUP"/> + </Property> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,0,120,0,0,0,-6"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="File berhasil dikirim."/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="70" y="20" width="110" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Tutup"/> + <Property name="alignmentX" type="float" value="0.5"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="focusPainted" type="boolean" value="false"/> + <Property name="focusable" type="boolean" value="false"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[50, 25]"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton1MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="100" y="50" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/gui/bgpop.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="250" height="120"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/src/gui/FileSent.java b/src/gui/FileSent.java new file mode 100644 index 0000000..e463b98 --- /dev/null +++ b/src/gui/FileSent.java @@ -0,0 +1,125 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package gui; + +/** + * + * @author Rosi + */ +public class FileSent extends javax.swing.JFrame { + + /** + * Creates new form FileSent + */ + public FileSent() { + initComponents(); + this.setLocationRelativeTo(null); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jLabel2 = new javax.swing.JLabel(); + jButton1 = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + + setTitle("File sent"); + setMinimumSize(new java.awt.Dimension(250, 120)); + setResizable(false); + setType(java.awt.Window.Type.POPUP); + getContentPane().setLayout(null); + + jLabel2.setFont(new java.awt.Font("Segoe UI", 1, 11)); // NOI18N + jLabel2.setText("File berhasil dikirim."); + getContentPane().add(jLabel2); + jLabel2.setBounds(70, 20, 110, 15); + + jButton1.setBackground(new java.awt.Color(138, 138, 255)); + jButton1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton1.setForeground(new java.awt.Color(255, 255, 255)); + jButton1.setText("Tutup"); + jButton1.setAlignmentX(0.5F); + jButton1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton1.setFocusPainted(false); + jButton1.setFocusable(false); + jButton1.setPreferredSize(new java.awt.Dimension(50, 25)); + jButton1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton1MouseClicked(evt); + } + }); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + getContentPane().add(jButton1); + jButton1.setBounds(100, 50, 50, 25); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/bgpop.png"))); // NOI18N + getContentPane().add(jLabel1); + jLabel1.setBounds(0, 0, 250, 120); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked + // TODO add your handling code here: + this.hide(); + }//GEN-LAST:event_jButton1MouseClicked + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton1ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(FileSent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(FileSent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(FileSent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(FileSent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new FileSent().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + // End of variables declaration//GEN-END:variables +} diff --git a/src/gui/FullLogs.form b/src/gui/FullLogs.form new file mode 100644 index 0000000..57d45c8 --- /dev/null +++ b/src/gui/FullLogs.form @@ -0,0 +1,547 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="ITB Printing Service"/> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[800, 600]"/> + </Property> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,88,0,0,3,32"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="jButton6"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Cek"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[140, 23]"/> + </Property> + <Property name="rolloverEnabled" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton6MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton6ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="570" y="100" width="50" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton4"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Kembali"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[140, 23]"/> + </Property> + <Property name="rolloverEnabled" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton4MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton4ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="360" y="510" width="70" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBox2"> + <Properties> + <Property name="editable" type="boolean" value="true"/> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="8"> + <StringItem index="0" value="2007"/> + <StringItem index="1" value="2008"/> + <StringItem index="2" value="2009"/> + <StringItem index="3" value="2010"/> + <StringItem index="4" value="2011"/> + <StringItem index="5" value="2012"/> + <StringItem index="6" value="2013"/> + <StringItem index="7" value="2014"/> + </StringArray> + </Property> + <Property name="autoscrolls" type="boolean" value="true"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="66" red="66" type="rgb"/> + </LineBorder> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jComboBox2FocusGained"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="510" y="100" width="50" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBox1"> + <Properties> + <Property name="editable" type="boolean" value="true"/> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="12"> + <StringItem index="0" value="Januari"/> + <StringItem index="1" value="Februari"/> + <StringItem index="2" value="Maret"/> + <StringItem index="3" value="April"/> + <StringItem index="4" value="Mei"/> + <StringItem index="5" value="Juni"/> + <StringItem index="6" value="Juli"/> + <StringItem index="7" value="Agustus"/> + <StringItem index="8" value="September"/> + <StringItem index="9" value="Oktober"/> + <StringItem index="10" value="November"/> + <StringItem index="11" value="Desember"/> + </StringArray> + </Property> + <Property name="autoscrolls" type="boolean" value="true"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="66" red="66" type="rgb"/> + </LineBorder> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jComboBox1FocusGained"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="400" y="100" width="100" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="18" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="66" red="66" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="April 2014"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="180" y="100" width="130" height="32"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton5"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="32" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="ITB Printing Service"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="c2" green="63" red="63" type="rgb"/> + </LineBorder> + </Border> + </Property> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="focusPainted" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton5MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="-10" y="0" width="340" height="50"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Admin Teknik Tenaga Listrik"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="423" y="30" width="150" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Logout"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="null"/> + </Property> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton1MouseClicked"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="720" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Ganti password"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="null"/> + </Property> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton2MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="600" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="8b" red="8b" type="rgb"/> + </LineBorder> + </Border> + </Property> + <Property name="focusable" type="boolean" value="false"/> + <Property name="opaque" type="boolean" value="false"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[452, 390]"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="180" y="140" width="440" height="342"/> + </Constraint> + </Constraints> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="jTable1"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="c2" green="63" red="63" type="rgb"/> + </LineBorder> + </Border> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="6" rowCount="20"> + <Column editable="false" title="ID" type="java.lang.String"> + <Data value="P12345"/> + <Data value="P16969"/> + <Data value="P12666"/> + <Data value="P17045"/> + <Data value="P04055"/> + <Data value="P19696"/> + <Data value="P12500"/> + <Data value="P12245"/> + <Data value="P12247"/> + <Data value="P12398"/> + <Data value="P12345"/> + <Data value="P16969"/> + <Data value="P12666"/> + <Data value="P17045"/> + <Data value="P04055"/> + <Data value="P19696"/> + <Data value="P12500"/> + <Data value="P12245"/> + <Data value="P12247"/> + <Data value="P12398"/> + </Column> + <Column editable="false" title="Tanggal" type="java.lang.String"> + <Data value="2014/01/01"/> + <Data value="2014/02/02"/> + <Data value="2014/03/03"/> + <Data value="2014/04/04"/> + <Data value="2014/05/05"/> + <Data value="2014/06/06"/> + <Data value="2014/07/07"/> + <Data value="2014/08/08"/> + <Data value="2014/09/09"/> + <Data value="2014/10/10"/> + <Data value="2014/01/01"/> + <Data value="2014/02/02"/> + <Data value="2014/03/03"/> + <Data value="2014/04/04"/> + <Data value="2014/05/05"/> + <Data value="2014/06/06"/> + <Data value="2014/07/07"/> + <Data value="2014/08/08"/> + <Data value="2014/09/09"/> + <Data value="2014/10/10"/> + </Column> + <Column editable="false" title="Waktu" type="java.lang.String"> + <Data value="01:00:00"/> + <Data value="02:00:00"/> + <Data value="03:00:00"/> + <Data value="04:00:00"/> + <Data value="05:00:00"/> + <Data value="06:00:00"/> + <Data value="07:00:00"/> + <Data value="08:00:00"/> + <Data value="09:00:00"/> + <Data value="10:00:00"/> + <Data value="01:00:00"/> + <Data value="02:00:00"/> + <Data value="03:00:00"/> + <Data value="04:00:00"/> + <Data value="05:00:00"/> + <Data value="06:00:00"/> + <Data value="07:00:00"/> + <Data value="08:00:00"/> + <Data value="09:00:00"/> + <Data value="10:00:00"/> + </Column> + <Column editable="false" title="NIM" type="java.lang.String"> + <Data value="13512666"/> + <Data value="13512696"/> + <Data value="13512174"/> + <Data value="13512555"/> + <Data value="13512111"/> + <Data value="13512088"/> + <Data value="13512245"/> + <Data value="13512247"/> + <Data value="13512666"/> + <Data value="13512398"/> + <Data value="13512666"/> + <Data value="13512696"/> + <Data value="13512174"/> + <Data value="13512555"/> + <Data value="13512111"/> + <Data value="13512088"/> + <Data value="13512245"/> + <Data value="13512247"/> + <Data value="13512666"/> + <Data value="13512398"/> + </Column> + <Column editable="false" title="Dicetak" type="java.lang.Boolean"> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + </Column> + <Column editable="true" title="Diambil" type="java.lang.Boolean"> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + <Data value="true"/> + </Column> + </Table> + </Property> + <Property name="autoResizeMode" type="int" value="4"/> + <Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor"> + <TableColumnModel selectionModel="0"> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title/> + <Editor/> + <Renderer/> + </Column> + </TableColumnModel> + </Property> + <Property name="gridColor" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="selectionBackground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="cf" red="cf" type="rgb"/> + </Property> + <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> + <TableHeader reorderingAllowed="true" resizingAllowed="true"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="97" y="234" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel10"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/gui/bg2.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="810" height="600"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/src/gui/FullLogs.java b/src/gui/FullLogs.java new file mode 100644 index 0000000..83044cb --- /dev/null +++ b/src/gui/FullLogs.java @@ -0,0 +1,374 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package gui; + +import gui.Login; + +/** + * + * @author Rosi + */ +public class FullLogs extends javax.swing.JFrame { + + /** + * Creates new form User + */ + public FullLogs() { + initComponents(); + this.setLocationRelativeTo(null); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jButton6 = new javax.swing.JButton(); + jButton4 = new javax.swing.JButton(); + jComboBox2 = new javax.swing.JComboBox(); + jComboBox1 = new javax.swing.JComboBox(); + jLabel2 = new javax.swing.JLabel(); + jButton5 = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + jButton1 = new javax.swing.JButton(); + jButton2 = new javax.swing.JButton(); + jScrollPane1 = new javax.swing.JScrollPane(); + jTable1 = new javax.swing.JTable(); + jLabel6 = new javax.swing.JLabel(); + jLabel10 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("ITB Printing Service"); + setMinimumSize(new java.awt.Dimension(800, 600)); + setResizable(false); + getContentPane().setLayout(null); + + jButton6.setBackground(new java.awt.Color(138, 138, 255)); + jButton6.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton6.setForeground(new java.awt.Color(255, 255, 255)); + jButton6.setText("Cek"); + jButton6.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton6.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton6.setPreferredSize(new java.awt.Dimension(140, 23)); + jButton6.setRolloverEnabled(false); + jButton6.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton6MouseClicked(evt); + } + }); + jButton6.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton6ActionPerformed(evt); + } + }); + getContentPane().add(jButton6); + jButton6.setBounds(570, 100, 50, 23); + + jButton4.setBackground(new java.awt.Color(138, 138, 255)); + jButton4.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton4.setForeground(new java.awt.Color(255, 255, 255)); + jButton4.setText("Kembali"); + jButton4.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton4.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton4.setPreferredSize(new java.awt.Dimension(140, 23)); + jButton4.setRolloverEnabled(false); + jButton4.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton4MouseClicked(evt); + } + }); + jButton4.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton4ActionPerformed(evt); + } + }); + getContentPane().add(jButton4); + jButton4.setBounds(360, 510, 70, 23); + + jComboBox2.setEditable(true); + jComboBox2.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014" })); + jComboBox2.setAutoscrolls(true); + jComboBox2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + jComboBox2.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jComboBox2FocusGained(evt); + } + }); + getContentPane().add(jComboBox2); + jComboBox2.setBounds(510, 100, 50, 22); + + jComboBox1.setEditable(true); + jComboBox1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember" })); + jComboBox1.setAutoscrolls(true); + jComboBox1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + jComboBox1.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jComboBox1FocusGained(evt); + } + }); + getContentPane().add(jComboBox1); + jComboBox1.setBounds(400, 100, 100, 22); + + jLabel2.setFont(new java.awt.Font("Segoe UI", 1, 18)); // NOI18N + jLabel2.setForeground(new java.awt.Color(102, 102, 255)); + jLabel2.setText("April 2014"); + getContentPane().add(jLabel2); + jLabel2.setBounds(180, 100, 130, 32); + + jButton5.setBackground(new java.awt.Color(255, 255, 255)); + jButton5.setFont(new java.awt.Font("Segoe UI", 0, 32)); // NOI18N + jButton5.setForeground(new java.awt.Color(255, 255, 255)); + jButton5.setText("ITB Printing Service"); + jButton5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(99, 99, 194))); + jButton5.setBorderPainted(false); + jButton5.setContentAreaFilled(false); + jButton5.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton5.setFocusPainted(false); + jButton5.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton5MouseClicked(evt); + } + }); + jButton5.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton5ActionPerformed(evt); + } + }); + getContentPane().add(jButton5); + jButton5.setBounds(-10, 0, 340, 50); + + jLabel1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel1.setText("Admin Teknik Tenaga Listrik"); + getContentPane().add(jLabel1); + jLabel1.setBounds(423, 30, 150, 15); + + jButton1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton1.setForeground(new java.awt.Color(255, 255, 255)); + jButton1.setText("Logout"); + jButton1.setBorder(null); + jButton1.setContentAreaFilled(false); + jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton1MouseClicked(evt); + } + }); + getContentPane().add(jButton1); + jButton1.setBounds(720, 30, 37, 15); + + jButton2.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton2.setForeground(new java.awt.Color(255, 255, 255)); + jButton2.setText("Ganti password"); + jButton2.setBorder(null); + jButton2.setContentAreaFilled(false); + jButton2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton2.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton2MouseClicked(evt); + } + }); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + getContentPane().add(jButton2); + jButton2.setBounds(600, 30, 81, 15); + + jScrollPane1.setBackground(new java.awt.Color(138, 138, 255)); + jScrollPane1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(139, 139, 255))); + jScrollPane1.setFocusable(false); + jScrollPane1.setOpaque(false); + jScrollPane1.setPreferredSize(new java.awt.Dimension(452, 390)); + + jTable1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(99, 99, 194))); + jTable1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jTable1.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + {"P12345", "2014/01/01", "01:00:00", "13512666", null, null}, + {"P16969", "2014/02/02", "02:00:00", "13512696", null, null}, + {"P12666", "2014/03/03", "03:00:00", "13512174", null, null}, + {"P17045", "2014/04/04", "04:00:00", "13512555", new Boolean(true), null}, + {"P04055", "2014/05/05", "05:00:00", "13512111", new Boolean(true), null}, + {"P19696", "2014/06/06", "06:00:00", "13512088", new Boolean(true), null}, + {"P12500", "2014/07/07", "07:00:00", "13512245", new Boolean(true), new Boolean(true)}, + {"P12245", "2014/08/08", "08:00:00", "13512247", new Boolean(true), new Boolean(true)}, + {"P12247", "2014/09/09", "09:00:00", "13512666", new Boolean(true), new Boolean(true)}, + {"P12398", "2014/10/10", "10:00:00", "13512398", new Boolean(true), new Boolean(true)}, + {"P12345", "2014/01/01", "01:00:00", "13512666", new Boolean(true), new Boolean(true)}, + {"P16969", "2014/02/02", "02:00:00", "13512696", new Boolean(true), new Boolean(true)}, + {"P12666", "2014/03/03", "03:00:00", "13512174", new Boolean(true), new Boolean(true)}, + {"P17045", "2014/04/04", "04:00:00", "13512555", new Boolean(true), new Boolean(true)}, + {"P04055", "2014/05/05", "05:00:00", "13512111", new Boolean(true), new Boolean(true)}, + {"P19696", "2014/06/06", "06:00:00", "13512088", new Boolean(true), new Boolean(true)}, + {"P12500", "2014/07/07", "07:00:00", "13512245", new Boolean(true), new Boolean(true)}, + {"P12245", "2014/08/08", "08:00:00", "13512247", new Boolean(true), new Boolean(true)}, + {"P12247", "2014/09/09", "09:00:00", "13512666", new Boolean(true), new Boolean(true)}, + {"P12398", "2014/10/10", "10:00:00", "13512398", new Boolean(true), new Boolean(true)} + }, + new String [] { + "ID", "Tanggal", "Waktu", "NIM", "Dicetak", "Diambil" + } + ) { + Class[] types = new Class [] { + java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Boolean.class, java.lang.Boolean.class + }; + boolean[] canEdit = new boolean [] { + false, false, false, false, false, true + }; + + public Class getColumnClass(int columnIndex) { + return types [columnIndex]; + } + + public boolean isCellEditable(int rowIndex, int columnIndex) { + return canEdit [columnIndex]; + } + }); + jTable1.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_ALL_COLUMNS); + jTable1.setGridColor(new java.awt.Color(138, 138, 255)); + jTable1.setSelectionBackground(new java.awt.Color(207, 207, 255)); + jScrollPane1.setViewportView(jTable1); + if (jTable1.getColumnModel().getColumnCount() > 0) { + jTable1.getColumnModel().getColumn(0).setResizable(false); + jTable1.getColumnModel().getColumn(1).setResizable(false); + jTable1.getColumnModel().getColumn(2).setResizable(false); + jTable1.getColumnModel().getColumn(3).setResizable(false); + jTable1.getColumnModel().getColumn(4).setResizable(false); + jTable1.getColumnModel().getColumn(5).setResizable(false); + } + + getContentPane().add(jScrollPane1); + jScrollPane1.setBounds(180, 140, 440, 342); + + jLabel6.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + getContentPane().add(jLabel6); + jLabel6.setBounds(97, 234, 0, 0); + + jLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/bg2.png"))); // NOI18N + getContentPane().add(jLabel10); + jLabel10.setBounds(0, 0, 810, 600); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton5ActionPerformed + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton2ActionPerformed + + private void jButton5MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton5MouseClicked + // TODO add your handling code here: + this.hide(); + FullLogs user = new FullLogs(); + user.show(); + }//GEN-LAST:event_jButton5MouseClicked + + private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked + // TODO add your handling code here: + this.hide(); + Login login = new Login(); + login.show(); + }//GEN-LAST:event_jButton1MouseClicked + + private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2MouseClicked + // TODO add your handling code here: + this.hide(); + ChangePasswordAdmin cpassmin = new ChangePasswordAdmin(); + cpassmin.show(); + }//GEN-LAST:event_jButton2MouseClicked + + private void jComboBox1FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jComboBox1FocusGained + // TODO add your handling code here: + jComboBox1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + }//GEN-LAST:event_jComboBox1FocusGained + + private void jComboBox2FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jComboBox2FocusGained + // TODO add your handling code here: + }//GEN-LAST:event_jComboBox2FocusGained + + private void jButton4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton4MouseClicked + // TODO add your handling code here: + this.hide(); + AdminIndex admindex = new AdminIndex(); + admindex.show(); + }//GEN-LAST:event_jButton4MouseClicked + + private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton4ActionPerformed + + private void jButton6MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton6MouseClicked + // TODO add your handling code here: + this.hide(); + FullLogs fulllogs = new FullLogs(); + fulllogs.show(); + }//GEN-LAST:event_jButton6MouseClicked + + private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton6ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(FullLogs.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(FullLogs.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(FullLogs.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(FullLogs.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new FullLogs().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JButton jButton4; + private javax.swing.JButton jButton5; + private javax.swing.JButton jButton6; + private javax.swing.JComboBox jComboBox1; + private javax.swing.JComboBox jComboBox2; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel10; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel6; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JTable jTable1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/gui/Login.form b/src/gui/Login.form new file mode 100644 index 0000000..bf2d660 --- /dev/null +++ b/src/gui/Login.form @@ -0,0 +1,185 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="ITB Printing Service"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Default Cursor"/> + </Property> + <Property name="locationByPlatform" type="boolean" value="true"/> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[800, 600]"/> + </Property> + <Property name="name" type="java.lang.String" value="ITB Printing Service" noResource="true"/> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,88,0,0,3,32"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Masukkan NIM dan password untuk mengakses layanan pencetakan."/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="230" y="230" width="400" height="20"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton5"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="32" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="ITB Printing Service"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="c2" green="63" red="63" type="rgb"/> + </LineBorder> + </Border> + </Property> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="focusPainted" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="-10" y="0" width="340" height="50"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JTextField" name="formNIM"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="NIM"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="66" red="66" type="rgb"/> + </LineBorder> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="formNIMFocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="formNIMFocusLost"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="formNIMMouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="formNIMActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="336" y="264" width="151" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JPasswordField" name="formPassword"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Password"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="66" red="66" type="rgb"/> + </LineBorder> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="formPasswordFocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="formPasswordFocusLost"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="formPasswordMouseClicked"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="336" y="292" width="151" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Login"/> + <Property name="alignmentX" type="float" value="0.5"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[50, 25]"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton1MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="386" y="332" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/gui/bg2.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="800" height="600"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/src/gui/Login.java b/src/gui/Login.java new file mode 100644 index 0000000..a0295dd --- /dev/null +++ b/src/gui/Login.java @@ -0,0 +1,216 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package gui; + +import javax.swing.JOptionPane; + +/** + * + * @author Rosi + */ +public class Login extends javax.swing.JFrame { + + /** + * Creates new form SistemCetakGUI + */ + public Login() { + initComponents(); + this.setLocationRelativeTo(null); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jLabel2 = new javax.swing.JLabel(); + jButton5 = new javax.swing.JButton(); + formNIM = new javax.swing.JTextField(); + formPassword = new javax.swing.JPasswordField(); + jButton1 = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("ITB Printing Service"); + setBackground(new java.awt.Color(255, 255, 255)); + setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + setLocationByPlatform(true); + setMinimumSize(new java.awt.Dimension(800, 600)); + setName("ITB Printing Service"); // NOI18N + setResizable(false); + getContentPane().setLayout(null); + + jLabel2.setFont(new java.awt.Font("Segoe UI", 1, 11)); // NOI18N + jLabel2.setText("Masukkan NIM dan password untuk mengakses layanan pencetakan."); + getContentPane().add(jLabel2); + jLabel2.setBounds(230, 230, 400, 20); + + jButton5.setBackground(new java.awt.Color(255, 255, 255)); + jButton5.setFont(new java.awt.Font("Segoe UI", 0, 32)); // NOI18N + jButton5.setForeground(new java.awt.Color(255, 255, 255)); + jButton5.setText("ITB Printing Service"); + jButton5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(99, 99, 194))); + jButton5.setBorderPainted(false); + jButton5.setContentAreaFilled(false); + jButton5.setFocusPainted(false); + jButton5.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton5ActionPerformed(evt); + } + }); + getContentPane().add(jButton5); + jButton5.setBounds(-10, 0, 340, 50); + + formNIM.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + formNIM.setText("NIM"); + formNIM.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + formNIM.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + formNIMFocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + formNIMFocusLost(evt); + } + }); + formNIM.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + formNIMMouseClicked(evt); + } + }); + formNIM.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + formNIMActionPerformed(evt); + } + }); + getContentPane().add(formNIM); + formNIM.setBounds(336, 264, 151, 22); + + formPassword.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + formPassword.setText("Password"); + formPassword.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + formPassword.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + formPasswordFocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + formPasswordFocusLost(evt); + } + }); + formPassword.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + formPasswordMouseClicked(evt); + } + }); + getContentPane().add(formPassword); + formPassword.setBounds(336, 292, 151, 22); + + jButton1.setBackground(new java.awt.Color(138, 138, 255)); + jButton1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton1.setForeground(new java.awt.Color(255, 255, 255)); + jButton1.setText("Login"); + jButton1.setAlignmentX(0.5F); + jButton1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton1.setPreferredSize(new java.awt.Dimension(50, 25)); + jButton1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton1MouseClicked(evt); + } + }); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + getContentPane().add(jButton1); + jButton1.setBounds(386, 332, 50, 25); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/bg2.png"))); // NOI18N + getContentPane().add(jLabel1); + jLabel1.setBounds(0, 0, 800, 600); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void formNIMActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_formNIMActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_formNIMActionPerformed + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton1ActionPerformed + + private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked + // TODO add your handling code here: + if (!Main.client.isLoggedIn()) { + Main.client.login(formNIM.getText(), formPassword.getText()); + } + if (Main.client.isLoggedIn()) { + this.hide(); + User user = new User(); + user.show(); + } else { + JOptionPane.showMessageDialog(this, "Wrong username or password!"); + } + + }//GEN-LAST:event_jButton1MouseClicked + + private void formNIMMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formNIMMouseClicked + // TODO add your handling code here: + formNIM.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + formNIM.setText(""); + }//GEN-LAST:event_formNIMMouseClicked + + private void formPasswordMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formPasswordMouseClicked + // TODO add your handling code here: + formPassword.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + }//GEN-LAST:event_formPasswordMouseClicked + + private void formNIMFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_formNIMFocusGained + // TODO add your handling code here: + formNIM.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + formNIM.setText(""); + }//GEN-LAST:event_formNIMFocusGained + + private void formPasswordFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_formPasswordFocusGained + // TODO add your handling code here: + formPassword.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + formPassword.setText(""); + }//GEN-LAST:event_formPasswordFocusGained + + private void formNIMFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_formNIMFocusLost + // TODO add your handling code here: + formNIM.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + if (formNIM.getText().equals("")) { + formNIM.setText("NIM"); + } + }//GEN-LAST:event_formNIMFocusLost + + private void formPasswordFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_formPasswordFocusLost + // TODO add your handling code here: + formPassword.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + if (formPassword.getText().equals("")) { + formPassword.setText("Password"); + } + }//GEN-LAST:event_formPasswordFocusLost + + private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton5ActionPerformed + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JTextField formNIM; + private javax.swing.JPasswordField formPassword; + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton5; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + // End of variables declaration//GEN-END:variables +} diff --git a/src/gui/LoginAdmin.form b/src/gui/LoginAdmin.form new file mode 100644 index 0000000..a8ab498 --- /dev/null +++ b/src/gui/LoginAdmin.form @@ -0,0 +1,185 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="ITB Printing Service"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Default Cursor"/> + </Property> + <Property name="locationByPlatform" type="boolean" value="true"/> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[800, 600]"/> + </Property> + <Property name="name" type="java.lang.String" value="ITB Printing Service" noResource="true"/> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,88,0,0,3,32"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Masukkan username dan password untuk mengakses laman administrasi."/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="225" y="230" width="400" height="20"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton5"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="32" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="ITB Printing Service"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="c2" green="63" red="63" type="rgb"/> + </LineBorder> + </Border> + </Property> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="focusPainted" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="-10" y="0" width="340" height="50"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JTextField" name="jTextField1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Username"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="66" red="66" type="rgb"/> + </LineBorder> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jTextField1FocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jTextField1FocusLost"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jTextField1MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextField1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="336" y="264" width="151" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JPasswordField" name="jPasswordField1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Password"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="66" red="66" type="rgb"/> + </LineBorder> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jPasswordField1FocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jPasswordField1FocusLost"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jPasswordField1MouseClicked"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="336" y="292" width="151" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Login"/> + <Property name="alignmentX" type="float" value="0.5"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[50, 25]"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton1MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="386" y="332" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/gui/bg2.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="800" height="600"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/src/gui/LoginAdmin.java b/src/gui/LoginAdmin.java new file mode 100644 index 0000000..52096db --- /dev/null +++ b/src/gui/LoginAdmin.java @@ -0,0 +1,206 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package gui; + +/** + * + * @author Rosi + */ +public class LoginAdmin extends javax.swing.JFrame { + + /** + * Creates new form SistemCetakGUI + */ + public LoginAdmin() { + initComponents(); + this.setLocationRelativeTo(null); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jLabel2 = new javax.swing.JLabel(); + jButton5 = new javax.swing.JButton(); + jTextField1 = new javax.swing.JTextField(); + jPasswordField1 = new javax.swing.JPasswordField(); + jButton1 = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("ITB Printing Service"); + setBackground(new java.awt.Color(255, 255, 255)); + setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + setLocationByPlatform(true); + setMinimumSize(new java.awt.Dimension(800, 600)); + setName("ITB Printing Service"); // NOI18N + setResizable(false); + getContentPane().setLayout(null); + + jLabel2.setFont(new java.awt.Font("Segoe UI", 1, 11)); // NOI18N + jLabel2.setText("Masukkan username dan password untuk mengakses laman administrasi."); + getContentPane().add(jLabel2); + jLabel2.setBounds(225, 230, 400, 20); + + jButton5.setBackground(new java.awt.Color(255, 255, 255)); + jButton5.setFont(new java.awt.Font("Segoe UI", 0, 32)); // NOI18N + jButton5.setForeground(new java.awt.Color(255, 255, 255)); + jButton5.setText("ITB Printing Service"); + jButton5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(99, 99, 194))); + jButton5.setBorderPainted(false); + jButton5.setContentAreaFilled(false); + jButton5.setFocusPainted(false); + jButton5.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton5ActionPerformed(evt); + } + }); + getContentPane().add(jButton5); + jButton5.setBounds(-10, 0, 340, 50); + + jTextField1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jTextField1.setText("Username"); + jTextField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + jTextField1.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTextField1FocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + jTextField1FocusLost(evt); + } + }); + jTextField1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jTextField1MouseClicked(evt); + } + }); + jTextField1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextField1ActionPerformed(evt); + } + }); + getContentPane().add(jTextField1); + jTextField1.setBounds(336, 264, 151, 22); + + jPasswordField1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jPasswordField1.setText("Password"); + jPasswordField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + jPasswordField1.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jPasswordField1FocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + jPasswordField1FocusLost(evt); + } + }); + jPasswordField1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jPasswordField1MouseClicked(evt); + } + }); + getContentPane().add(jPasswordField1); + jPasswordField1.setBounds(336, 292, 151, 22); + + jButton1.setBackground(new java.awt.Color(138, 138, 255)); + jButton1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton1.setForeground(new java.awt.Color(255, 255, 255)); + jButton1.setText("Login"); + jButton1.setAlignmentX(0.5F); + jButton1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton1.setPreferredSize(new java.awt.Dimension(50, 25)); + jButton1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton1MouseClicked(evt); + } + }); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + getContentPane().add(jButton1); + jButton1.setBounds(386, 332, 50, 25); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/bg2.png"))); // NOI18N + getContentPane().add(jLabel1); + jLabel1.setBounds(0, 0, 800, 600); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTextField1ActionPerformed + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton1ActionPerformed + + private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked + // TODO add your handling code here: + this.hide(); + AdminIndex admindex = new AdminIndex(); + admindex.show(); + }//GEN-LAST:event_jButton1MouseClicked + + private void jTextField1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTextField1MouseClicked + // TODO add your handling code here: + jTextField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + jTextField1.setText(""); + }//GEN-LAST:event_jTextField1MouseClicked + + private void jPasswordField1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jPasswordField1MouseClicked + // TODO add your handling code here: + jPasswordField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + }//GEN-LAST:event_jPasswordField1MouseClicked + + private void jTextField1FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField1FocusGained + // TODO add your handling code here: + jTextField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + jTextField1.setText(""); + }//GEN-LAST:event_jTextField1FocusGained + + private void jPasswordField1FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jPasswordField1FocusGained + // TODO add your handling code here: + jPasswordField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + jPasswordField1.setText(""); + }//GEN-LAST:event_jPasswordField1FocusGained + + private void jTextField1FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField1FocusLost + // TODO add your handling code here: + jTextField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + if (jTextField1.getText().equals("")) { + jTextField1.setText("NIM"); + } + }//GEN-LAST:event_jTextField1FocusLost + + private void jPasswordField1FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jPasswordField1FocusLost + // TODO add your handling code here: + jPasswordField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + if (jPasswordField1.getText().equals("")) { + jPasswordField1.setText("Password"); + } + }//GEN-LAST:event_jPasswordField1FocusLost + + private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton5ActionPerformed + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton5; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JPasswordField jPasswordField1; + private javax.swing.JTextField jTextField1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/gui/Main.java b/src/gui/Main.java new file mode 100644 index 0000000..619cbcc --- /dev/null +++ b/src/gui/Main.java @@ -0,0 +1,45 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package gui; + +import Client.Client; +import gui.Login; +import java.io.File; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import org.w3c.dom.Document; +import org.w3c.dom.Element; + +/** + * + * @author Rosi + */ +public class Main { + + /** + * @param args the command line arguments + */ + public static Client client; + + public static void main(String[] args) { + // TODO code application logic here + try + { + File file = new File("config.xml"); + DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + Document doc = builder.parse(file); + Element Server = (Element) doc.getElementsByTagName("server_addr").item(0); + client = new Client(Server.getTextContent(), 5432); + Login login = new Login(); + login.show(); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + +} diff --git a/src/gui/MainAdmin.java b/src/gui/MainAdmin.java new file mode 100644 index 0000000..c839a1a --- /dev/null +++ b/src/gui/MainAdmin.java @@ -0,0 +1,23 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package gui; + +/** + * + * @author Rosi + */ +public class MainAdmin { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + // TODO code application logic here + LoginAdmin loginadmin = new LoginAdmin(); + loginadmin.show(); + } + +} diff --git a/src/gui/Print.form b/src/gui/Print.form new file mode 100644 index 0000000..d98dbb1 --- /dev/null +++ b/src/gui/Print.form @@ -0,0 +1,426 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="ITB Printing Service"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[800, 600]"/> + </Property> + <Property name="name" type="java.lang.String" value="Print" noResource="true"/> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,88,0,0,3,32"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel15"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="P12666"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="170" y="120" width="120" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel14"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Print ID :"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="120" width="120" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton4"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Download file"/> + <Property name="alignmentX" type="float" value="0.5"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="opaque" type="boolean" value="true"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[50, 25]"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="110" y="260" width="90" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel13"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="1, 4-17"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="170" y="200" width="120" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel12"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Halaman BW :"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="200" width="120" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel11"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="13512666 Rosiana Rozi"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="170" y="137" width="120" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel8"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="17 Mei 2014"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="170" y="155" width="120" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="06:06:06"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="170" y="173" width="120" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel5"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Rp4.000,-"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="170" y="220" width="120" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Kebutuhan kuota :"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="220" width="120" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Waktu :"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="173" width="120" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Tanggal :"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="155" width="120" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel10"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Admin Teknik Tenaga Listrik"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="423" y="30" width="150" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel7"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Preview"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="420" y="70" width="50" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Logout"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="null"/> + </Property> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton1MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="720" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton6"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Ganti password"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="null"/> + </Property> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton6MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton6ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="600" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton5"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="32" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="ITB Printing Service"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="c2" green="63" red="63" type="rgb"/> + </LineBorder> + </Border> + </Property> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="focusPainted" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="-10" y="0" width="340" height="50"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Pengirim :"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="137" width="120" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="alignmentX" type="float" value="0.5"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="label" type="java.lang.String" value="Print"/> + <Property name="opaque" type="boolean" value="true"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[50, 25]"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton2MouseClicked"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="330" y="520" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton3"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Kembali"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="opaque" type="boolean" value="true"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[50, 25]"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton3MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="400" y="520" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel9"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/gui/bg2.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="800" height="600"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/src/gui/Print.java b/src/gui/Print.java new file mode 100644 index 0000000..2c0ba8f --- /dev/null +++ b/src/gui/Print.java @@ -0,0 +1,352 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package gui; + +import gui.Login; +import gui.PrintSuccess; + +/** + * + * @author Rosi + */ +public class Print extends javax.swing.JFrame { + + /** + * Creates new form Upload + */ + public Print() { + initComponents(); + this.setLocationRelativeTo(null); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jLabel15 = new javax.swing.JLabel(); + jLabel14 = new javax.swing.JLabel(); + jButton4 = new javax.swing.JButton(); + jLabel13 = new javax.swing.JLabel(); + jLabel12 = new javax.swing.JLabel(); + jLabel11 = new javax.swing.JLabel(); + jLabel8 = new javax.swing.JLabel(); + jLabel6 = new javax.swing.JLabel(); + jLabel5 = new javax.swing.JLabel(); + jLabel4 = new javax.swing.JLabel(); + jLabel3 = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); + jLabel10 = new javax.swing.JLabel(); + jLabel7 = new javax.swing.JLabel(); + jButton1 = new javax.swing.JButton(); + jButton6 = new javax.swing.JButton(); + jButton5 = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + jButton2 = new javax.swing.JButton(); + jButton3 = new javax.swing.JButton(); + jLabel9 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("ITB Printing Service"); + setBackground(new java.awt.Color(255, 255, 255)); + setMinimumSize(new java.awt.Dimension(800, 600)); + setName("Print"); // NOI18N + setResizable(false); + getContentPane().setLayout(null); + + jLabel15.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel15.setText("P12666"); + getContentPane().add(jLabel15); + jLabel15.setBounds(170, 120, 120, 15); + + jLabel14.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel14.setText("Print ID :"); + getContentPane().add(jLabel14); + jLabel14.setBounds(50, 120, 120, 15); + + jButton4.setBackground(new java.awt.Color(138, 138, 255)); + jButton4.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton4.setForeground(new java.awt.Color(255, 255, 255)); + jButton4.setText("Download file"); + jButton4.setAlignmentX(0.5F); + jButton4.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton4.setBorderPainted(false); + jButton4.setContentAreaFilled(false); + jButton4.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton4.setOpaque(true); + jButton4.setPreferredSize(new java.awt.Dimension(50, 25)); + getContentPane().add(jButton4); + jButton4.setBounds(110, 260, 90, 25); + + jLabel13.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel13.setText("1, 4-17"); + getContentPane().add(jLabel13); + jLabel13.setBounds(170, 200, 120, 15); + + jLabel12.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel12.setText("Halaman BW :"); + getContentPane().add(jLabel12); + jLabel12.setBounds(50, 200, 120, 15); + + jLabel11.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel11.setText("13512666 Rosiana Rozi"); + getContentPane().add(jLabel11); + jLabel11.setBounds(170, 137, 120, 15); + + jLabel8.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel8.setText("17 Mei 2014"); + getContentPane().add(jLabel8); + jLabel8.setBounds(170, 155, 120, 15); + + jLabel6.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel6.setText("06:06:06"); + getContentPane().add(jLabel6); + jLabel6.setBounds(170, 173, 120, 15); + + jLabel5.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel5.setText("Rp4.000,-"); + getContentPane().add(jLabel5); + jLabel5.setBounds(170, 220, 120, 15); + + jLabel4.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel4.setText("Kebutuhan kuota :"); + getContentPane().add(jLabel4); + jLabel4.setBounds(50, 220, 120, 15); + + jLabel3.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel3.setText("Waktu :"); + getContentPane().add(jLabel3); + jLabel3.setBounds(50, 173, 120, 15); + + jLabel2.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel2.setText("Tanggal :"); + getContentPane().add(jLabel2); + jLabel2.setBounds(50, 155, 120, 15); + + jLabel10.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel10.setText("Admin Teknik Tenaga Listrik"); + getContentPane().add(jLabel10); + jLabel10.setBounds(423, 30, 150, 15); + + jLabel7.setFont(new java.awt.Font("Segoe UI", 1, 11)); // NOI18N + jLabel7.setText("Preview"); + getContentPane().add(jLabel7); + jLabel7.setBounds(420, 70, 50, 15); + + jButton1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton1.setForeground(new java.awt.Color(255, 255, 255)); + jButton1.setText("Logout"); + jButton1.setBorder(null); + jButton1.setContentAreaFilled(false); + jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton1MouseClicked(evt); + } + }); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + getContentPane().add(jButton1); + jButton1.setBounds(720, 30, 37, 15); + + jButton6.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton6.setForeground(new java.awt.Color(255, 255, 255)); + jButton6.setText("Ganti password"); + jButton6.setBorder(null); + jButton6.setContentAreaFilled(false); + jButton6.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton6.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton6MouseClicked(evt); + } + }); + jButton6.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton6ActionPerformed(evt); + } + }); + getContentPane().add(jButton6); + jButton6.setBounds(600, 30, 81, 15); + + jButton5.setBackground(new java.awt.Color(255, 255, 255)); + jButton5.setFont(new java.awt.Font("Segoe UI", 0, 32)); // NOI18N + jButton5.setForeground(new java.awt.Color(255, 255, 255)); + jButton5.setText("ITB Printing Service"); + jButton5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(99, 99, 194))); + jButton5.setBorderPainted(false); + jButton5.setContentAreaFilled(false); + jButton5.setFocusPainted(false); + jButton5.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton5ActionPerformed(evt); + } + }); + getContentPane().add(jButton5); + jButton5.setBounds(-10, 0, 340, 50); + + jLabel1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel1.setText("Pengirim :"); + getContentPane().add(jLabel1); + jLabel1.setBounds(50, 137, 120, 15); + + jButton2.setBackground(new java.awt.Color(138, 138, 255)); + jButton2.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton2.setForeground(new java.awt.Color(255, 255, 255)); + jButton2.setAlignmentX(0.5F); + jButton2.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton2.setBorderPainted(false); + jButton2.setContentAreaFilled(false); + jButton2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton2.setLabel("Print"); + jButton2.setOpaque(true); + jButton2.setPreferredSize(new java.awt.Dimension(50, 25)); + jButton2.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton2MouseClicked(evt); + } + }); + getContentPane().add(jButton2); + jButton2.setBounds(330, 520, 50, 25); + + jButton3.setBackground(new java.awt.Color(138, 138, 255)); + jButton3.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton3.setForeground(new java.awt.Color(255, 255, 255)); + jButton3.setText("Kembali"); + jButton3.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton3.setBorderPainted(false); + jButton3.setContentAreaFilled(false); + jButton3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton3.setOpaque(true); + jButton3.setPreferredSize(new java.awt.Dimension(50, 25)); + jButton3.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton3MouseClicked(evt); + } + }); + jButton3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton3ActionPerformed(evt); + } + }); + getContentPane().add(jButton3); + jButton3.setBounds(400, 520, 50, 25); + + jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/bg2.png"))); // NOI18N + getContentPane().add(jLabel9); + jLabel9.setBounds(0, 0, 800, 600); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton3ActionPerformed + + private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton5ActionPerformed + + private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton6ActionPerformed + + private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked + // TODO add your handling code here: + this.hide(); + Login login = new Login(); + login.show(); + }//GEN-LAST:event_jButton1MouseClicked + + private void jButton3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton3MouseClicked + // TODO add your handling code here: + this.hide(); + User user = new User(); + user.show(); + }//GEN-LAST:event_jButton3MouseClicked + + private void jButton6MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton6MouseClicked + // TODO add your handling code here: + this.hide(); + ChangePasswordAdmin cpassmin = new ChangePasswordAdmin(); + cpassmin.show(); + }//GEN-LAST:event_jButton6MouseClicked + + private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2MouseClicked + // TODO add your handling code here: + PrintSuccess printsuccess = new PrintSuccess(); + printsuccess.show(); + }//GEN-LAST:event_jButton2MouseClicked + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + Main.client.logout(); + }//GEN-LAST:event_jButton1ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(Print.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(Print.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(Print.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(Print.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new Print().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JButton jButton3; + private javax.swing.JButton jButton4; + private javax.swing.JButton jButton5; + private javax.swing.JButton jButton6; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel10; + private javax.swing.JLabel jLabel11; + private javax.swing.JLabel jLabel12; + private javax.swing.JLabel jLabel13; + private javax.swing.JLabel jLabel14; + private javax.swing.JLabel jLabel15; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel6; + private javax.swing.JLabel jLabel7; + private javax.swing.JLabel jLabel8; + private javax.swing.JLabel jLabel9; + // End of variables declaration//GEN-END:variables +} diff --git a/src/gui/PrintSuccess.form b/src/gui/PrintSuccess.form new file mode 100644 index 0000000..fa82f9f --- /dev/null +++ b/src/gui/PrintSuccess.form @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="title" type="java.lang.String" value="Print success"/> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[250, 120]"/> + </Property> + <Property name="resizable" type="boolean" value="false"/> + <Property name="type" type="java.awt.Window$Type" editor="org.netbeans.modules.form.editors.EnumEditor"> + <Value id="POPUP"/> + </Property> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,0,120,0,0,0,-6"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Pencetakan berhasil."/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="70" y="20" width="110" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Tutup"/> + <Property name="alignmentX" type="float" value="0.5"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="focusPainted" type="boolean" value="false"/> + <Property name="focusable" type="boolean" value="false"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[50, 25]"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton1MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="100" y="50" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/gui/bgpop.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="250" height="120"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/src/gui/PrintSuccess.java b/src/gui/PrintSuccess.java new file mode 100644 index 0000000..3bcab69 --- /dev/null +++ b/src/gui/PrintSuccess.java @@ -0,0 +1,125 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package gui; + +/** + * + * @author Rosi + */ +public class PrintSuccess extends javax.swing.JFrame { + + /** + * Creates new form FileSent + */ + public PrintSuccess() { + initComponents(); + this.setLocationRelativeTo(null); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jLabel2 = new javax.swing.JLabel(); + jButton1 = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + + setTitle("Print success"); + setMinimumSize(new java.awt.Dimension(250, 120)); + setResizable(false); + setType(java.awt.Window.Type.POPUP); + getContentPane().setLayout(null); + + jLabel2.setFont(new java.awt.Font("Segoe UI", 1, 11)); // NOI18N + jLabel2.setText("Pencetakan berhasil."); + getContentPane().add(jLabel2); + jLabel2.setBounds(70, 20, 110, 15); + + jButton1.setBackground(new java.awt.Color(138, 138, 255)); + jButton1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton1.setForeground(new java.awt.Color(255, 255, 255)); + jButton1.setText("Tutup"); + jButton1.setAlignmentX(0.5F); + jButton1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton1.setFocusPainted(false); + jButton1.setFocusable(false); + jButton1.setPreferredSize(new java.awt.Dimension(50, 25)); + jButton1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton1MouseClicked(evt); + } + }); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + getContentPane().add(jButton1); + jButton1.setBounds(100, 50, 50, 25); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/bgpop.png"))); // NOI18N + getContentPane().add(jLabel1); + jLabel1.setBounds(0, 0, 250, 120); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked + // TODO add your handling code here: + this.hide(); + }//GEN-LAST:event_jButton1MouseClicked + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton1ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(PrintSuccess.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(PrintSuccess.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(PrintSuccess.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(PrintSuccess.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new PrintSuccess().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + // End of variables declaration//GEN-END:variables +} diff --git a/src/gui/StatChangeSuccess.form b/src/gui/StatChangeSuccess.form new file mode 100644 index 0000000..be7d8b7 --- /dev/null +++ b/src/gui/StatChangeSuccess.form @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="title" type="java.lang.String" value="Status changed"/> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[250, 120]"/> + </Property> + <Property name="resizable" type="boolean" value="false"/> + <Property name="type" type="java.awt.Window$Type" editor="org.netbeans.modules.form.editors.EnumEditor"> + <Value id="POPUP"/> + </Property> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,0,120,0,0,0,-6"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Akun berhasil dinonaktifkan."/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="20" width="160" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Tutup"/> + <Property name="alignmentX" type="float" value="0.5"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="focusPainted" type="boolean" value="false"/> + <Property name="focusable" type="boolean" value="false"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[50, 25]"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton1MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="100" y="50" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/gui/bgpop.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="250" height="120"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/src/gui/StatChangeSuccess.java b/src/gui/StatChangeSuccess.java new file mode 100644 index 0000000..cf11c44 --- /dev/null +++ b/src/gui/StatChangeSuccess.java @@ -0,0 +1,125 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package gui; + +/** + * + * @author Rosi + */ +public class StatChangeSuccess extends javax.swing.JFrame { + + /** + * Creates new form FileSent + */ + public StatChangeSuccess() { + initComponents(); + this.setLocationRelativeTo(null); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jLabel2 = new javax.swing.JLabel(); + jButton1 = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + + setTitle("Status changed"); + setMinimumSize(new java.awt.Dimension(250, 120)); + setResizable(false); + setType(java.awt.Window.Type.POPUP); + getContentPane().setLayout(null); + + jLabel2.setFont(new java.awt.Font("Segoe UI", 1, 11)); // NOI18N + jLabel2.setText("Akun berhasil dinonaktifkan."); + getContentPane().add(jLabel2); + jLabel2.setBounds(50, 20, 160, 15); + + jButton1.setBackground(new java.awt.Color(138, 138, 255)); + jButton1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton1.setForeground(new java.awt.Color(255, 255, 255)); + jButton1.setText("Tutup"); + jButton1.setAlignmentX(0.5F); + jButton1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton1.setFocusPainted(false); + jButton1.setFocusable(false); + jButton1.setPreferredSize(new java.awt.Dimension(50, 25)); + jButton1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton1MouseClicked(evt); + } + }); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + getContentPane().add(jButton1); + jButton1.setBounds(100, 50, 50, 25); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/bgpop.png"))); // NOI18N + getContentPane().add(jLabel1); + jLabel1.setBounds(0, 0, 250, 120); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked + // TODO add your handling code here: + this.hide(); + }//GEN-LAST:event_jButton1MouseClicked + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton1ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(StatChangeSuccess.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(StatChangeSuccess.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(StatChangeSuccess.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(StatChangeSuccess.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new StatChangeSuccess().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + // End of variables declaration//GEN-END:variables +} diff --git a/src/gui/Upload.form b/src/gui/Upload.form new file mode 100644 index 0000000..12e0bf3 --- /dev/null +++ b/src/gui/Upload.form @@ -0,0 +1,540 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="ITB Printing Service"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[800, 600]"/> + </Property> + <Property name="name" type="java.lang.String" value="Print" noResource="true"/> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,88,0,0,3,32"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel7"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Preview"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="420" y="70" width="50" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel11"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Prodi pengambilan"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="420" width="140" height="14"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBox1"> + <Properties> + <Property name="editable" type="boolean" value="true"/> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="5"> + <StringItem index="0" value="Teknik Informatika"/> + <StringItem index="1" value="Sistem dan Teknologi Informasi"/> + <StringItem index="2" value="Teknik Tenaga Listrik"/> + <StringItem index="3" value="Teknik Elektro"/> + <StringItem index="4" value="Teknik Telekomunikasi"/> + </StringArray> + </Property> + <Property name="autoscrolls" type="boolean" value="true"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="66" red="66" type="rgb"/> + </LineBorder> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jComboBox1FocusGained"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="440" width="240" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Logout"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="null"/> + </Property> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton1MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="720" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton6"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Ganti password"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="null"/> + </Property> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton6MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton6ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="600" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel8"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Rosiana Rozi (13512666)"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="450" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton5"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="32" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="ITB Printing Service"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="c2" green="63" red="63" type="rgb"/> + </LineBorder> + </Border> + </Property> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="focusPainted" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="-10" y="0" width="340" height="50"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JTextField" name="formPath"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="66" red="66" type="rgb"/> + </LineBorder> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="formPathFocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="formPathFocusLost"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="90" width="233" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Cetak halaman"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="137" width="80" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JRadioButton" name="jRadioButton1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Semua halaman"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="contentAreaFilled" type="boolean" value="false"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="160" width="110" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JRadioButton" name="jRadioButton2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Ditentukan"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="180" width="90" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JTextField" name="jTextField2"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="66" red="66" type="rgb"/> + </LineBorder> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jTextField2FocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jTextField2FocusLost"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="127" y="198" width="220" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Halaman :"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="70" y="200" width="60" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Masukkan nomor halaman dengan contoh format 5,7-14"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="70" y="225" width="300" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Pengaturan warna"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="280" width="110" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JRadioButton" name="jRadioButton3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Warna menyesuaikan halaman"/> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="300" width="190" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JRadioButton" name="jRadioButton4"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Semua halaman BW"/> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="320" width="140" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JRadioButton" name="jRadioButton5"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Ditentukan"/> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="340" width="90" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel5"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Halaman BW :"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="70" y="362" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JTextField" name="jTextField3"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="66" red="66" type="rgb"/> + </LineBorder> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jTextField3FocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jTextField3FocusLost"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="150" y="359" width="200" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Masukkan nomor halaman dengan contoh format 5,7-14"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="70" y="388" width="300" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="buttonPrint"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="alignmentX" type="float" value="0.5"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="label" type="java.lang.String" value="Print"/> + <Property name="opaque" type="boolean" value="true"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[50, 25]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonPrintActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="330" y="520" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton3"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Kembali"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="opaque" type="boolean" value="true"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[50, 25]"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton3MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="400" y="520" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="buttonBrowse"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Pilih file..."/> + <Property name="alignmentX" type="float" value="0.5"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="opaque" type="boolean" value="true"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[50, 25]"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="buttonBrowseMouseClicked"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="290" y="90" width="62" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel9"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/gui/bg2.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="800" height="600"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/src/gui/Upload.java b/src/gui/Upload.java new file mode 100644 index 0000000..f19b288 --- /dev/null +++ b/src/gui/Upload.java @@ -0,0 +1,472 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package gui; + +import java.awt.Dialog; +import java.io.File; + +/** + * + * @author Rosi + */ +public class Upload extends javax.swing.JFrame { + + /** + * Creates new form Upload + */ + public static File file; + public static String path = ""; + + public Upload() { + initComponents(); + this.setLocationRelativeTo(null); + formPath.setText(path); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jLabel7 = new javax.swing.JLabel(); + jLabel11 = new javax.swing.JLabel(); + jComboBox1 = new javax.swing.JComboBox(); + jButton1 = new javax.swing.JButton(); + jButton6 = new javax.swing.JButton(); + jLabel8 = new javax.swing.JLabel(); + jButton5 = new javax.swing.JButton(); + formPath = new javax.swing.JTextField(); + jLabel1 = new javax.swing.JLabel(); + jRadioButton1 = new javax.swing.JRadioButton(); + jRadioButton2 = new javax.swing.JRadioButton(); + jTextField2 = new javax.swing.JTextField(); + jLabel2 = new javax.swing.JLabel(); + jLabel3 = new javax.swing.JLabel(); + jLabel4 = new javax.swing.JLabel(); + jRadioButton3 = new javax.swing.JRadioButton(); + jRadioButton4 = new javax.swing.JRadioButton(); + jRadioButton5 = new javax.swing.JRadioButton(); + jLabel5 = new javax.swing.JLabel(); + jTextField3 = new javax.swing.JTextField(); + jLabel6 = new javax.swing.JLabel(); + buttonPrint = new javax.swing.JButton(); + jButton3 = new javax.swing.JButton(); + buttonBrowse = new javax.swing.JButton(); + jLabel9 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("ITB Printing Service"); + setBackground(new java.awt.Color(255, 255, 255)); + setMinimumSize(new java.awt.Dimension(800, 600)); + setName("Print"); // NOI18N + setResizable(false); + getContentPane().setLayout(null); + + jLabel7.setFont(new java.awt.Font("Segoe UI", 1, 11)); // NOI18N + jLabel7.setText("Preview"); + getContentPane().add(jLabel7); + jLabel7.setBounds(420, 70, 50, 15); + + jLabel11.setFont(new java.awt.Font("Segoe UI", 1, 11)); // NOI18N + jLabel11.setText("Prodi pengambilan"); + getContentPane().add(jLabel11); + jLabel11.setBounds(50, 420, 140, 14); + + jComboBox1.setEditable(true); + jComboBox1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Teknik Informatika", "Sistem dan Teknologi Informasi", "Teknik Tenaga Listrik", "Teknik Elektro", "Teknik Telekomunikasi" })); + jComboBox1.setAutoscrolls(true); + jComboBox1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + jComboBox1.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jComboBox1FocusGained(evt); + } + }); + getContentPane().add(jComboBox1); + jComboBox1.setBounds(50, 440, 240, 22); + + jButton1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton1.setForeground(new java.awt.Color(255, 255, 255)); + jButton1.setText("Logout"); + jButton1.setBorder(null); + jButton1.setContentAreaFilled(false); + jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton1MouseClicked(evt); + } + }); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + getContentPane().add(jButton1); + jButton1.setBounds(720, 30, 37, 15); + + jButton6.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton6.setForeground(new java.awt.Color(255, 255, 255)); + jButton6.setText("Ganti password"); + jButton6.setBorder(null); + jButton6.setContentAreaFilled(false); + jButton6.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton6.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton6MouseClicked(evt); + } + }); + jButton6.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton6ActionPerformed(evt); + } + }); + getContentPane().add(jButton6); + jButton6.setBounds(600, 30, 81, 15); + + jLabel8.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel8.setText("Rosiana Rozi (13512666)"); + getContentPane().add(jLabel8); + jLabel8.setBounds(450, 30, 123, 15); + + jButton5.setBackground(new java.awt.Color(255, 255, 255)); + jButton5.setFont(new java.awt.Font("Segoe UI", 0, 32)); // NOI18N + jButton5.setForeground(new java.awt.Color(255, 255, 255)); + jButton5.setText("ITB Printing Service"); + jButton5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(99, 99, 194))); + jButton5.setBorderPainted(false); + jButton5.setContentAreaFilled(false); + jButton5.setFocusPainted(false); + jButton5.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton5ActionPerformed(evt); + } + }); + getContentPane().add(jButton5); + jButton5.setBounds(-10, 0, 340, 50); + + formPath.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + formPath.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + formPathFocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + formPathFocusLost(evt); + } + }); + getContentPane().add(formPath); + formPath.setBounds(50, 90, 233, 22); + + jLabel1.setFont(new java.awt.Font("Segoe UI", 1, 11)); // NOI18N + jLabel1.setText("Cetak halaman"); + getContentPane().add(jLabel1); + jLabel1.setBounds(50, 137, 80, 15); + + jRadioButton1.setBackground(new java.awt.Color(255, 255, 255)); + jRadioButton1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jRadioButton1.setText("Semua halaman"); + jRadioButton1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jRadioButton1.setContentAreaFilled(false); + getContentPane().add(jRadioButton1); + jRadioButton1.setBounds(50, 160, 110, 17); + + jRadioButton2.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jRadioButton2.setText("Ditentukan"); + jRadioButton2.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jRadioButton2.setOpaque(false); + getContentPane().add(jRadioButton2); + jRadioButton2.setBounds(50, 180, 90, 17); + + jTextField2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + jTextField2.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTextField2FocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + jTextField2FocusLost(evt); + } + }); + getContentPane().add(jTextField2); + jTextField2.setBounds(127, 198, 220, 22); + + jLabel2.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel2.setText("Halaman :"); + getContentPane().add(jLabel2); + jLabel2.setBounds(70, 200, 60, 15); + + jLabel3.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel3.setText("Masukkan nomor halaman dengan contoh format 5,7-14"); + getContentPane().add(jLabel3); + jLabel3.setBounds(70, 225, 300, 15); + + jLabel4.setFont(new java.awt.Font("Segoe UI", 1, 11)); // NOI18N + jLabel4.setText("Pengaturan warna"); + getContentPane().add(jLabel4); + jLabel4.setBounds(50, 280, 110, 15); + + jRadioButton3.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jRadioButton3.setText("Warna menyesuaikan halaman"); + jRadioButton3.setOpaque(false); + getContentPane().add(jRadioButton3); + jRadioButton3.setBounds(50, 300, 190, 23); + + jRadioButton4.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jRadioButton4.setText("Semua halaman BW"); + jRadioButton4.setOpaque(false); + getContentPane().add(jRadioButton4); + jRadioButton4.setBounds(50, 320, 140, 23); + + jRadioButton5.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jRadioButton5.setText("Ditentukan"); + jRadioButton5.setOpaque(false); + getContentPane().add(jRadioButton5); + jRadioButton5.setBounds(50, 340, 90, 23); + + jLabel5.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel5.setText("Halaman BW :"); + getContentPane().add(jLabel5); + jLabel5.setBounds(70, 362, 72, 15); + + jTextField3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + jTextField3.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTextField3FocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + jTextField3FocusLost(evt); + } + }); + getContentPane().add(jTextField3); + jTextField3.setBounds(150, 359, 200, 22); + + jLabel6.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel6.setText("Masukkan nomor halaman dengan contoh format 5,7-14"); + getContentPane().add(jLabel6); + jLabel6.setBounds(70, 388, 300, 15); + + buttonPrint.setBackground(new java.awt.Color(138, 138, 255)); + buttonPrint.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + buttonPrint.setForeground(new java.awt.Color(255, 255, 255)); + buttonPrint.setAlignmentX(0.5F); + buttonPrint.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + buttonPrint.setBorderPainted(false); + buttonPrint.setContentAreaFilled(false); + buttonPrint.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + buttonPrint.setLabel("Print"); + buttonPrint.setOpaque(true); + buttonPrint.setPreferredSize(new java.awt.Dimension(50, 25)); + buttonPrint.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + buttonPrintActionPerformed(evt); + } + }); + getContentPane().add(buttonPrint); + buttonPrint.setBounds(330, 520, 50, 25); + + jButton3.setBackground(new java.awt.Color(138, 138, 255)); + jButton3.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton3.setForeground(new java.awt.Color(255, 255, 255)); + jButton3.setText("Kembali"); + jButton3.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton3.setBorderPainted(false); + jButton3.setContentAreaFilled(false); + jButton3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton3.setOpaque(true); + jButton3.setPreferredSize(new java.awt.Dimension(50, 25)); + jButton3.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton3MouseClicked(evt); + } + }); + jButton3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton3ActionPerformed(evt); + } + }); + getContentPane().add(jButton3); + jButton3.setBounds(400, 520, 50, 25); + + buttonBrowse.setBackground(new java.awt.Color(138, 138, 255)); + buttonBrowse.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + buttonBrowse.setForeground(new java.awt.Color(255, 255, 255)); + buttonBrowse.setText("Pilih file..."); + buttonBrowse.setAlignmentX(0.5F); + buttonBrowse.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + buttonBrowse.setBorderPainted(false); + buttonBrowse.setContentAreaFilled(false); + buttonBrowse.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + buttonBrowse.setOpaque(true); + buttonBrowse.setPreferredSize(new java.awt.Dimension(50, 25)); + buttonBrowse.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + buttonBrowseMouseClicked(evt); + } + }); + getContentPane().add(buttonBrowse); + buttonBrowse.setBounds(290, 90, 62, 22); + + jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/bg2.png"))); // NOI18N + getContentPane().add(jLabel9); + jLabel9.setBounds(0, 0, 800, 600); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton3ActionPerformed + + private void formPathFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_formPathFocusGained + // TODO add your handling code here: + formPath.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + }//GEN-LAST:event_formPathFocusGained + + private void formPathFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_formPathFocusLost + // TODO add your handling code here: + formPath.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + }//GEN-LAST:event_formPathFocusLost + + private void jTextField2FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField2FocusGained + // TODO add your handling code here: + jTextField2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + }//GEN-LAST:event_jTextField2FocusGained + + private void jTextField2FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField2FocusLost + // TODO add your handling code here: + jTextField2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + }//GEN-LAST:event_jTextField2FocusLost + + private void jTextField3FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField3FocusGained + // TODO add your handling code here: + jTextField3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + }//GEN-LAST:event_jTextField3FocusGained + + private void jTextField3FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField3FocusLost + // TODO add your handling code here: + jTextField3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + }//GEN-LAST:event_jTextField3FocusLost + + private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton5ActionPerformed + + private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton6ActionPerformed + + private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked + // TODO add your handling code here: + this.hide(); + Login login = new Login(); + login.show(); + }//GEN-LAST:event_jButton1MouseClicked + + private void jButton3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton3MouseClicked + // TODO add your handling code here: + this.hide(); + User user = new User(); + user.show(); + }//GEN-LAST:event_jButton3MouseClicked + + private void buttonBrowseMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_buttonBrowseMouseClicked + // TODO add your handling code here: + FileDialog filedialog = new FileDialog(this, true); + filedialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL); + filedialog.show(); + formPath.setText(path); + }//GEN-LAST:event_buttonBrowseMouseClicked + + private void jButton6MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton6MouseClicked + // TODO add your handling code here: + this.hide(); + ChangePassword cpass = new ChangePassword(); + cpass.show(); + }//GEN-LAST:event_jButton6MouseClicked + + private void jComboBox1FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jComboBox1FocusGained + // TODO add your handling code here: + jComboBox1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + }//GEN-LAST:event_jComboBox1FocusGained + + private void buttonPrintActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPrintActionPerformed + // TODO add your handling code here: + String path; + path = formPath.getText(); + System.out.println(path); + Main.client.sendFile(path); + System.out.println("DONE"); + }//GEN-LAST:event_buttonPrintActionPerformed + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + Main.client.logout(); + }//GEN-LAST:event_jButton1ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(Upload.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(Upload.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(Upload.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(Upload.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new Upload().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton buttonBrowse; + private javax.swing.JButton buttonPrint; + private javax.swing.JTextField formPath; + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton3; + private javax.swing.JButton jButton5; + private javax.swing.JButton jButton6; + private javax.swing.JComboBox jComboBox1; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel11; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel6; + private javax.swing.JLabel jLabel7; + private javax.swing.JLabel jLabel8; + private javax.swing.JLabel jLabel9; + private javax.swing.JRadioButton jRadioButton1; + private javax.swing.JRadioButton jRadioButton2; + private javax.swing.JRadioButton jRadioButton3; + private javax.swing.JRadioButton jRadioButton4; + private javax.swing.JRadioButton jRadioButton5; + private javax.swing.JTextField jTextField2; + private javax.swing.JTextField jTextField3; + // End of variables declaration//GEN-END:variables +} diff --git a/src/gui/User.form b/src/gui/User.form new file mode 100644 index 0000000..96ce38c --- /dev/null +++ b/src/gui/User.form @@ -0,0 +1,546 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="ITB Printing Service"/> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[800, 600]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[800, 600]"/> + </Property> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,88,0,0,3,32"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="labelKuota"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Rp40.000,-"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="170" y="190" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel16"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="33" green="99" red="0" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Aktif"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="170" y="170" width="80" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="labelStatus"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Mahasiswa TA"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="170" y="150" width="100" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel14"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Kuota :"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="70" y="190" width="100" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel13"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Status akun :"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="70" y="170" width="100" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel12"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Status pengguna :"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="70" y="150" width="100" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="labelNama"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="18" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="c2" green="63" red="63" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="13512666 Rosiana Rozi"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="70" y="110" width="290" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton5"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="32" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="ITB Printing Service"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="c2" green="63" red="63" type="rgb"/> + </LineBorder> + </Border> + </Property> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="focusPainted" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton5MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="-10" y="0" width="340" height="50"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Rosiana Rozi (13512666)"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="450" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="buttonLogout"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Logout"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="null"/> + </Property> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="buttonLogoutMouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonLogoutActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="720" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton4"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Ke halaman cetak"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[140, 23]"/> + </Property> + <Property name="rolloverEnabled" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton4MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton4ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="340" y="500" width="119" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Ganti password"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="null"/> + </Property> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton2MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="600" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Log terbaru"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="360" y="150" width="70" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="8b" red="8b" type="rgb"/> + </LineBorder> + </Border> + </Property> + <Property name="focusable" type="boolean" value="false"/> + <Property name="opaque" type="boolean" value="false"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[452, 390]"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="360" y="170" width="358" height="182"/> + </Constraint> + </Constraints> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="jTable1"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="c2" green="63" red="63" type="rgb"/> + </LineBorder> + </Border> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="5" rowCount="10"> + <Column editable="false" title="ID" type="java.lang.String"> + <Data value="C12345"/> + <Data value="P16969"/> + <Data value="C12666"/> + <Data value="P17045"/> + <Data value="P04055"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + </Column> + <Column editable="false" title="Tanggal" type="java.lang.String"> + <Data value="2014/01/01"/> + <Data value="2014/02/02"/> + <Data value="2014/03/03"/> + <Data value="2014/04/04"/> + <Data value="2014/05/05"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + </Column> + <Column editable="false" title="Waktu" type="java.lang.String"> + <Data value="01:00:00"/> + <Data value="02:00:00"/> + <Data value="03:00:00"/> + <Data value="04:00:00"/> + <Data value="05:00:00"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + </Column> + <Column editable="false" title="Debet" type="java.lang.Integer"> + <Data value="50000"/> + <Data value="20000"/> + <Data value="100000"/> + <Data value="50000"/> + <Data value="40000"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + </Column> + <Column editable="false" title="Kuota" type="java.lang.Integer"> + <Data value="50000"/> + <Data value="30000"/> + <Data value="130000"/> + <Data value="80000"/> + <Data value="40000"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + </Column> + </Table> + </Property> + <Property name="autoResizeMode" type="int" value="4"/> + <Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor"> + <TableColumnModel selectionModel="0"> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title value="ID"/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title value="Tanggal"/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title value="Waktu"/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title value="Debet"/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title value="Kuota"/> + <Editor/> + <Renderer/> + </Column> + </TableColumnModel> + </Property> + <Property name="gridColor" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="selectionBackground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="cf" red="cf" type="rgb"/> + </Property> + <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> + <TableHeader reorderingAllowed="true" resizingAllowed="true"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="jButton3"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Cek status file"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[120, 17]"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton3MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="480" y="370" width="-1" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Status :"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="360" y="430" width="60" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel5"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Print ID :"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="360" y="410" width="60" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="97" y="234" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel8"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="P04055"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="420" y="410" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel9"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="33" green="99" red="0" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Terkirim, sudah dicetak"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="420" y="430" width="130" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel10"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/gui/bg2.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="810" height="600"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/src/gui/User.java b/src/gui/User.java new file mode 100644 index 0000000..53e8c75 --- /dev/null +++ b/src/gui/User.java @@ -0,0 +1,426 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package gui; + +import javax.swing.JOptionPane; +import gui.Login; +import gui.Upload; + +/** + * + * @author Rosi + */ +public class User extends javax.swing.JFrame { + + /** + * Creates new form User + */ + public User() { + initComponents(); + this.setLocationRelativeTo(null); + com.data.User userData = Main.client.getUserData(); + labelNama.setText(userData.getUsername() + " " + userData.getNama()); + labelKuota.setText(String.valueOf(userData.getSaldo())); + if(userData.getStatus() == 1) + labelStatus.setText("Mahasiswa TA"); + else if(userData.getStatus() == 0) + labelStatus.setText("Mahasiswa non-TA"); + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + labelKuota = new javax.swing.JLabel(); + jLabel16 = new javax.swing.JLabel(); + labelStatus = new javax.swing.JLabel(); + jLabel14 = new javax.swing.JLabel(); + jLabel13 = new javax.swing.JLabel(); + jLabel12 = new javax.swing.JLabel(); + labelNama = new javax.swing.JLabel(); + jButton5 = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + buttonLogout = new javax.swing.JButton(); + jButton4 = new javax.swing.JButton(); + jButton2 = new javax.swing.JButton(); + jLabel3 = new javax.swing.JLabel(); + jScrollPane1 = new javax.swing.JScrollPane(); + jTable1 = new javax.swing.JTable(); + jButton3 = new javax.swing.JButton(); + jLabel4 = new javax.swing.JLabel(); + jLabel5 = new javax.swing.JLabel(); + jLabel6 = new javax.swing.JLabel(); + jLabel8 = new javax.swing.JLabel(); + jLabel9 = new javax.swing.JLabel(); + jLabel10 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("ITB Printing Service"); + setMinimumSize(new java.awt.Dimension(800, 600)); + setPreferredSize(new java.awt.Dimension(800, 600)); + setResizable(false); + getContentPane().setLayout(null); + + labelKuota.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + labelKuota.setText("Rp40.000,-"); + getContentPane().add(labelKuota); + labelKuota.setBounds(170, 190, 54, 15); + + jLabel16.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel16.setForeground(new java.awt.Color(0, 153, 51)); + jLabel16.setText("Aktif"); + getContentPane().add(jLabel16); + jLabel16.setBounds(170, 170, 80, 15); + + labelStatus.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + labelStatus.setText("Mahasiswa TA"); + getContentPane().add(labelStatus); + labelStatus.setBounds(170, 150, 100, 15); + + jLabel14.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel14.setText("Kuota :"); + getContentPane().add(jLabel14); + jLabel14.setBounds(70, 190, 100, 15); + + jLabel13.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel13.setText("Status akun :"); + getContentPane().add(jLabel13); + jLabel13.setBounds(70, 170, 100, 15); + + jLabel12.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel12.setText("Status pengguna :"); + getContentPane().add(jLabel12); + jLabel12.setBounds(70, 150, 100, 15); + + labelNama.setFont(new java.awt.Font("Segoe UI", 1, 18)); // NOI18N + labelNama.setForeground(new java.awt.Color(99, 99, 194)); + labelNama.setText("13512666 Rosiana Rozi"); + getContentPane().add(labelNama); + labelNama.setBounds(70, 110, 290, 25); + + jButton5.setBackground(new java.awt.Color(255, 255, 255)); + jButton5.setFont(new java.awt.Font("Segoe UI", 0, 32)); // NOI18N + jButton5.setForeground(new java.awt.Color(255, 255, 255)); + jButton5.setText("ITB Printing Service"); + jButton5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(99, 99, 194))); + jButton5.setBorderPainted(false); + jButton5.setContentAreaFilled(false); + jButton5.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton5.setFocusPainted(false); + jButton5.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton5MouseClicked(evt); + } + }); + jButton5.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton5ActionPerformed(evt); + } + }); + getContentPane().add(jButton5); + jButton5.setBounds(-10, 0, 340, 50); + + jLabel1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel1.setText("Rosiana Rozi (13512666)"); + getContentPane().add(jLabel1); + jLabel1.setBounds(450, 30, 123, 15); + + buttonLogout.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + buttonLogout.setForeground(new java.awt.Color(255, 255, 255)); + buttonLogout.setText("Logout"); + buttonLogout.setBorder(null); + buttonLogout.setContentAreaFilled(false); + buttonLogout.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + buttonLogout.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + buttonLogoutMouseClicked(evt); + } + }); + buttonLogout.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + buttonLogoutActionPerformed(evt); + } + }); + getContentPane().add(buttonLogout); + buttonLogout.setBounds(720, 30, 37, 15); + + jButton4.setBackground(new java.awt.Color(138, 138, 255)); + jButton4.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton4.setForeground(new java.awt.Color(255, 255, 255)); + jButton4.setText("Ke halaman cetak"); + jButton4.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton4.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton4.setPreferredSize(new java.awt.Dimension(140, 23)); + jButton4.setRolloverEnabled(false); + jButton4.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton4MouseClicked(evt); + } + }); + jButton4.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton4ActionPerformed(evt); + } + }); + getContentPane().add(jButton4); + jButton4.setBounds(340, 500, 119, 23); + + jButton2.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton2.setForeground(new java.awt.Color(255, 255, 255)); + jButton2.setText("Ganti password"); + jButton2.setBorder(null); + jButton2.setContentAreaFilled(false); + jButton2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton2.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton2MouseClicked(evt); + } + }); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + getContentPane().add(jButton2); + jButton2.setBounds(600, 30, 81, 15); + + jLabel3.setFont(new java.awt.Font("Segoe UI", 1, 11)); // NOI18N + jLabel3.setText("Log terbaru"); + getContentPane().add(jLabel3); + jLabel3.setBounds(360, 150, 70, 15); + + jScrollPane1.setBackground(new java.awt.Color(138, 138, 255)); + jScrollPane1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(139, 139, 255))); + jScrollPane1.setFocusable(false); + jScrollPane1.setOpaque(false); + jScrollPane1.setPreferredSize(new java.awt.Dimension(452, 390)); + + jTable1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(99, 99, 194))); + jTable1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jTable1.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + {"C12345", "2014/01/01", "01:00:00", new Integer(50000), new Integer(50000)}, + {"P16969", "2014/02/02", "02:00:00", new Integer(20000), new Integer(30000)}, + {"C12666", "2014/03/03", "03:00:00", new Integer(100000), new Integer(130000)}, + {"P17045", "2014/04/04", "04:00:00", new Integer(50000), new Integer(80000)}, + {"P04055", "2014/05/05", "05:00:00", new Integer(40000), new Integer(40000)}, + {null, null, null, null, null}, + {null, null, null, null, null}, + {null, null, null, null, null}, + {null, null, null, null, null}, + {null, null, null, null, null} + }, + new String [] { + "ID", "Tanggal", "Waktu", "Debet", "Kuota" + } + ) { + Class[] types = new Class [] { + java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.Integer.class + }; + boolean[] canEdit = new boolean [] { + false, false, false, false, false + }; + + public Class getColumnClass(int columnIndex) { + return types [columnIndex]; + } + + public boolean isCellEditable(int rowIndex, int columnIndex) { + return canEdit [columnIndex]; + } + }); + jTable1.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_ALL_COLUMNS); + jTable1.setGridColor(new java.awt.Color(138, 138, 255)); + jTable1.setSelectionBackground(new java.awt.Color(207, 207, 255)); + jScrollPane1.setViewportView(jTable1); + if (jTable1.getColumnModel().getColumnCount() > 0) { + jTable1.getColumnModel().getColumn(0).setResizable(false); + jTable1.getColumnModel().getColumn(0).setHeaderValue("ID"); + jTable1.getColumnModel().getColumn(1).setResizable(false); + jTable1.getColumnModel().getColumn(1).setHeaderValue("Tanggal"); + jTable1.getColumnModel().getColumn(2).setResizable(false); + jTable1.getColumnModel().getColumn(2).setHeaderValue("Waktu"); + jTable1.getColumnModel().getColumn(3).setResizable(false); + jTable1.getColumnModel().getColumn(3).setHeaderValue("Debet"); + jTable1.getColumnModel().getColumn(4).setResizable(false); + jTable1.getColumnModel().getColumn(4).setHeaderValue("Kuota"); + } + + getContentPane().add(jScrollPane1); + jScrollPane1.setBounds(360, 170, 358, 182); + + jButton3.setBackground(new java.awt.Color(138, 138, 255)); + jButton3.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton3.setForeground(new java.awt.Color(255, 255, 255)); + jButton3.setText("Cek status file"); + jButton3.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton3.setPreferredSize(new java.awt.Dimension(120, 17)); + jButton3.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton3MouseClicked(evt); + } + }); + jButton3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton3ActionPerformed(evt); + } + }); + getContentPane().add(jButton3); + jButton3.setBounds(480, 370, 120, 22); + + jLabel4.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel4.setText("Status :"); + getContentPane().add(jLabel4); + jLabel4.setBounds(360, 430, 60, 15); + + jLabel5.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel5.setText("Print ID :"); + getContentPane().add(jLabel5); + jLabel5.setBounds(360, 410, 60, 15); + + jLabel6.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + getContentPane().add(jLabel6); + jLabel6.setBounds(97, 234, 0, 0); + + jLabel8.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel8.setText("P04055"); + getContentPane().add(jLabel8); + jLabel8.setBounds(420, 410, 36, 15); + + jLabel9.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel9.setForeground(new java.awt.Color(0, 153, 51)); + jLabel9.setText("Terkirim, sudah dicetak"); + getContentPane().add(jLabel9); + jLabel9.setBounds(420, 430, 130, 15); + + jLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/bg2.png"))); // NOI18N + getContentPane().add(jLabel10); + jLabel10.setBounds(0, 0, 810, 600); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton4ActionPerformed + + private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton3ActionPerformed + + private void jButton3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton3MouseClicked + // TODO add your handling code here: + }//GEN-LAST:event_jButton3MouseClicked + + private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton5ActionPerformed + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton2ActionPerformed + + private void jButton5MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton5MouseClicked + // TODO add your handling code here: + this.hide(); + //.client.logout(); + JOptionPane.showMessageDialog(this, "You have been logged out"); + //Login login = new gui.Login(); + //login.show(); + }//GEN-LAST:event_jButton5MouseClicked + + private void buttonLogoutMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_buttonLogoutMouseClicked + // TODO add your handling code here: + this.hide(); + Login login = new Login(); + login.show(); + }//GEN-LAST:event_buttonLogoutMouseClicked + + private void jButton4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton4MouseClicked + // TODO add your handling code here: + this.hide(); + Upload upload = new Upload(); + upload.show(); + }//GEN-LAST:event_jButton4MouseClicked + + private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2MouseClicked + // TODO add your handling code here: + this.hide(); + ChangePassword cpass = new ChangePassword(); + cpass.show(); + }//GEN-LAST:event_jButton2MouseClicked + + private void buttonLogoutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonLogoutActionPerformed + Main.client.logout(); + }//GEN-LAST:event_buttonLogoutActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(User.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(User.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(User.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(User.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new User().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton buttonLogout; + private javax.swing.JButton jButton2; + private javax.swing.JButton jButton3; + private javax.swing.JButton jButton4; + private javax.swing.JButton jButton5; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel10; + private javax.swing.JLabel jLabel12; + private javax.swing.JLabel jLabel13; + private javax.swing.JLabel jLabel14; + private javax.swing.JLabel jLabel16; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel6; + private javax.swing.JLabel jLabel8; + private javax.swing.JLabel jLabel9; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JTable jTable1; + private javax.swing.JLabel labelKuota; + private javax.swing.JLabel labelNama; + private javax.swing.JLabel labelStatus; + // End of variables declaration//GEN-END:variables +} diff --git a/src/gui/UserManagement.form b/src/gui/UserManagement.form new file mode 100644 index 0000000..eba8843 --- /dev/null +++ b/src/gui/UserManagement.form @@ -0,0 +1,546 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="ITB Printing Service"/> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[800, 600]"/> + </Property> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,88,0,0,3,32"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="jButton6"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Deaktivasi akun"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[120, 17]"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton6MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton6ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="310" width="-1" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel11"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="33" green="99" red="0" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Aktif"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="150" y="200" width="80" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel7"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Status akun :"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="200" width="100" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton3"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Isi ulang kuota"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[120, 17]"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton3MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="220" y="250" width="-1" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JTextField" name="jTextField1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Masukkan jumlah uang"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="66" red="66" type="rgb"/> + </LineBorder> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jTextField1FocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jTextField1FocusLost"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jTextField1MouseClicked"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="250" width="165" height="22"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Admin Teknik Tenaga Listrik"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="423" y="30" width="150" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton5"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="32" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="ITB Printing Service"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="c2" green="63" red="63" type="rgb"/> + </LineBorder> + </Border> + </Property> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="focusPainted" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton5MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="-10" y="0" width="340" height="50"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Logout"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="null"/> + </Property> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton1MouseClicked"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="720" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="18" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="c2" green="63" red="63" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="13512666 Rosiana Rozi"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="47" y="141" width="290" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton4"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Kembali"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[140, 23]"/> + </Property> + <Property name="rolloverEnabled" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton4MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton4ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="359" y="500" width="70" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Ganti password"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="null"/> + </Property> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton2MouseClicked"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="600" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Log akun"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="390" y="180" width="50" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="ff" green="8b" red="8b" type="rgb"/> + </LineBorder> + </Border> + </Property> + <Property name="focusable" type="boolean" value="false"/> + <Property name="opaque" type="boolean" value="false"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[452, 390]"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="390" y="200" width="358" height="182"/> + </Constraint> + </Constraints> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="jTable1"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder> + <Color PropertyName="color" blue="c2" green="63" red="63" type="rgb"/> + </LineBorder> + </Border> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="5" rowCount="10"> + <Column editable="false" title="ID" type="java.lang.String"> + <Data value="C12345"/> + <Data value="P16969"/> + <Data value="C12666"/> + <Data value="P17045"/> + <Data value="P04055"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + </Column> + <Column editable="false" title="Tanggal" type="java.lang.String"> + <Data value="2014/01/01"/> + <Data value="2014/02/02"/> + <Data value="2014/03/03"/> + <Data value="2014/04/04"/> + <Data value="2014/05/05"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + </Column> + <Column editable="false" title="Waktu" type="java.lang.String"> + <Data value="01:00:00"/> + <Data value="02:00:00"/> + <Data value="03:00:00"/> + <Data value="04:00:00"/> + <Data value="05:00:00"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + </Column> + <Column editable="false" title="Debet" type="java.lang.Integer"> + <Data value="50000"/> + <Data value="20000"/> + <Data value="100000"/> + <Data value="50000"/> + <Data value="40000"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + </Column> + <Column editable="false" title="Kuota" type="java.lang.Integer"> + <Data value="50000"/> + <Data value="30000"/> + <Data value="130000"/> + <Data value="80000"/> + <Data value="40000"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + <Data value="null"/> + </Column> + </Table> + </Property> + <Property name="autoResizeMode" type="int" value="4"/> + <Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor"> + <TableColumnModel selectionModel="0"> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false"> + <Title/> + <Editor/> + <Renderer/> + </Column> + </TableColumnModel> + </Property> + <Property name="gridColor" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="8a" red="8a" type="rgb"/> + </Property> + <Property name="selectionBackground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="cf" red="cf" type="rgb"/> + </Property> + <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> + <TableHeader reorderingAllowed="true" resizingAllowed="true"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Kuota :"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="220" width="100" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel5"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Status pengguna :"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="180" width="100" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="97" y="234" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel8"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Mahasiswa TA"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="150" y="180" width="100" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel9"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Segoe UI" size="11" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Rp40.000,-"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="150" y="220" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel10"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/gui/bg2.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="810" height="600"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/src/gui/UserManagement.java b/src/gui/UserManagement.java new file mode 100644 index 0000000..2a7a67b --- /dev/null +++ b/src/gui/UserManagement.java @@ -0,0 +1,445 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package gui; + +import gui.ConfirmStatChange; +import gui.Login; + +/** + * + * @author Rosi + */ +public class UserManagement extends javax.swing.JFrame { + + /** + * Creates new form User + */ + public UserManagement() { + initComponents(); + this.setLocationRelativeTo(null); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jButton6 = new javax.swing.JButton(); + jLabel11 = new javax.swing.JLabel(); + jLabel7 = new javax.swing.JLabel(); + jButton3 = new javax.swing.JButton(); + jTextField1 = new javax.swing.JTextField(); + jLabel1 = new javax.swing.JLabel(); + jButton5 = new javax.swing.JButton(); + jButton1 = new javax.swing.JButton(); + jLabel2 = new javax.swing.JLabel(); + jButton4 = new javax.swing.JButton(); + jButton2 = new javax.swing.JButton(); + jLabel3 = new javax.swing.JLabel(); + jScrollPane1 = new javax.swing.JScrollPane(); + jTable1 = new javax.swing.JTable(); + jLabel4 = new javax.swing.JLabel(); + jLabel5 = new javax.swing.JLabel(); + jLabel6 = new javax.swing.JLabel(); + jLabel8 = new javax.swing.JLabel(); + jLabel9 = new javax.swing.JLabel(); + jLabel10 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("ITB Printing Service"); + setMinimumSize(new java.awt.Dimension(800, 600)); + setResizable(false); + getContentPane().setLayout(null); + + jButton6.setBackground(new java.awt.Color(138, 138, 255)); + jButton6.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton6.setForeground(new java.awt.Color(255, 255, 255)); + jButton6.setText("Deaktivasi akun"); + jButton6.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton6.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton6.setPreferredSize(new java.awt.Dimension(120, 17)); + jButton6.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton6MouseClicked(evt); + } + }); + jButton6.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton6ActionPerformed(evt); + } + }); + getContentPane().add(jButton6); + jButton6.setBounds(50, 310, 120, 22); + + jLabel11.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel11.setForeground(new java.awt.Color(0, 153, 51)); + jLabel11.setText("Aktif"); + getContentPane().add(jLabel11); + jLabel11.setBounds(150, 200, 80, 15); + + jLabel7.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel7.setText("Status akun :"); + getContentPane().add(jLabel7); + jLabel7.setBounds(50, 200, 100, 15); + + jButton3.setBackground(new java.awt.Color(138, 138, 255)); + jButton3.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton3.setForeground(new java.awt.Color(255, 255, 255)); + jButton3.setText("Isi ulang kuota"); + jButton3.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton3.setPreferredSize(new java.awt.Dimension(120, 17)); + jButton3.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton3MouseClicked(evt); + } + }); + jButton3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton3ActionPerformed(evt); + } + }); + getContentPane().add(jButton3); + jButton3.setBounds(220, 250, 120, 22); + + jTextField1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jTextField1.setText("Masukkan jumlah uang"); + jTextField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + jTextField1.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTextField1FocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + jTextField1FocusLost(evt); + } + }); + jTextField1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jTextField1MouseClicked(evt); + } + }); + getContentPane().add(jTextField1); + jTextField1.setBounds(50, 250, 165, 22); + + jLabel1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel1.setText("Admin Teknik Tenaga Listrik"); + getContentPane().add(jLabel1); + jLabel1.setBounds(423, 30, 150, 15); + + jButton5.setBackground(new java.awt.Color(255, 255, 255)); + jButton5.setFont(new java.awt.Font("Segoe UI", 0, 32)); // NOI18N + jButton5.setForeground(new java.awt.Color(255, 255, 255)); + jButton5.setText("ITB Printing Service"); + jButton5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(99, 99, 194))); + jButton5.setBorderPainted(false); + jButton5.setContentAreaFilled(false); + jButton5.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton5.setFocusPainted(false); + jButton5.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton5MouseClicked(evt); + } + }); + jButton5.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton5ActionPerformed(evt); + } + }); + getContentPane().add(jButton5); + jButton5.setBounds(-10, 0, 340, 50); + + jButton1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton1.setForeground(new java.awt.Color(255, 255, 255)); + jButton1.setText("Logout"); + jButton1.setBorder(null); + jButton1.setContentAreaFilled(false); + jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton1MouseClicked(evt); + } + }); + getContentPane().add(jButton1); + jButton1.setBounds(720, 30, 37, 15); + + jLabel2.setFont(new java.awt.Font("Segoe UI", 1, 18)); // NOI18N + jLabel2.setForeground(new java.awt.Color(99, 99, 194)); + jLabel2.setText("13512666 Rosiana Rozi"); + getContentPane().add(jLabel2); + jLabel2.setBounds(47, 141, 290, 25); + + jButton4.setBackground(new java.awt.Color(138, 138, 255)); + jButton4.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton4.setForeground(new java.awt.Color(255, 255, 255)); + jButton4.setText("Kembali"); + jButton4.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + jButton4.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton4.setPreferredSize(new java.awt.Dimension(140, 23)); + jButton4.setRolloverEnabled(false); + jButton4.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton4MouseClicked(evt); + } + }); + jButton4.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton4ActionPerformed(evt); + } + }); + getContentPane().add(jButton4); + jButton4.setBounds(359, 500, 70, 23); + + jButton2.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jButton2.setForeground(new java.awt.Color(255, 255, 255)); + jButton2.setText("Ganti password"); + jButton2.setBorder(null); + jButton2.setContentAreaFilled(false); + jButton2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton2.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButton2MouseClicked(evt); + } + }); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + getContentPane().add(jButton2); + jButton2.setBounds(600, 30, 81, 15); + + jLabel3.setFont(new java.awt.Font("Segoe UI", 1, 11)); // NOI18N + jLabel3.setText("Log akun"); + getContentPane().add(jLabel3); + jLabel3.setBounds(390, 180, 50, 15); + + jScrollPane1.setBackground(new java.awt.Color(138, 138, 255)); + jScrollPane1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(139, 139, 255))); + jScrollPane1.setFocusable(false); + jScrollPane1.setOpaque(false); + jScrollPane1.setPreferredSize(new java.awt.Dimension(452, 390)); + + jTable1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(99, 99, 194))); + jTable1.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jTable1.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + {"C12345", "2014/01/01", "01:00:00", new Integer(50000), new Integer(50000)}, + {"P16969", "2014/02/02", "02:00:00", new Integer(20000), new Integer(30000)}, + {"C12666", "2014/03/03", "03:00:00", new Integer(100000), new Integer(130000)}, + {"P17045", "2014/04/04", "04:00:00", new Integer(50000), new Integer(80000)}, + {"P04055", "2014/05/05", "05:00:00", new Integer(40000), new Integer(40000)}, + {null, null, null, null, null}, + {null, null, null, null, null}, + {null, null, null, null, null}, + {null, null, null, null, null}, + {null, null, null, null, null} + }, + new String [] { + "ID", "Tanggal", "Waktu", "Debet", "Kuota" + } + ) { + Class[] types = new Class [] { + java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.Integer.class + }; + boolean[] canEdit = new boolean [] { + false, false, false, false, false + }; + + public Class getColumnClass(int columnIndex) { + return types [columnIndex]; + } + + public boolean isCellEditable(int rowIndex, int columnIndex) { + return canEdit [columnIndex]; + } + }); + jTable1.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_ALL_COLUMNS); + jTable1.setGridColor(new java.awt.Color(138, 138, 255)); + jTable1.setSelectionBackground(new java.awt.Color(207, 207, 255)); + jScrollPane1.setViewportView(jTable1); + if (jTable1.getColumnModel().getColumnCount() > 0) { + jTable1.getColumnModel().getColumn(0).setResizable(false); + jTable1.getColumnModel().getColumn(1).setResizable(false); + jTable1.getColumnModel().getColumn(2).setResizable(false); + jTable1.getColumnModel().getColumn(3).setResizable(false); + jTable1.getColumnModel().getColumn(4).setResizable(false); + } + + getContentPane().add(jScrollPane1); + jScrollPane1.setBounds(390, 200, 358, 182); + + jLabel4.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel4.setText("Kuota :"); + getContentPane().add(jLabel4); + jLabel4.setBounds(50, 220, 100, 15); + + jLabel5.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel5.setText("Status pengguna :"); + getContentPane().add(jLabel5); + jLabel5.setBounds(50, 180, 100, 15); + + jLabel6.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + getContentPane().add(jLabel6); + jLabel6.setBounds(97, 234, 0, 0); + + jLabel8.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel8.setText("Mahasiswa TA"); + getContentPane().add(jLabel8); + jLabel8.setBounds(150, 180, 100, 15); + + jLabel9.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N + jLabel9.setText("Rp40.000,-"); + getContentPane().add(jLabel9); + jLabel9.setBounds(150, 220, 54, 15); + + jLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/bg2.png"))); // NOI18N + getContentPane().add(jLabel10); + jLabel10.setBounds(0, 0, 810, 600); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton4ActionPerformed + + private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton5ActionPerformed + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton2ActionPerformed + + private void jButton5MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton5MouseClicked + // TODO add your handling code here: + this.hide(); + UserManagement user = new UserManagement(); + user.show(); + }//GEN-LAST:event_jButton5MouseClicked + + private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked + // TODO add your handling code here: + this.hide(); + Login login = new Login(); + login.show(); + }//GEN-LAST:event_jButton1MouseClicked + + private void jButton4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton4MouseClicked + // TODO add your handling code here: + this.hide(); + AdminIndex admindex = new AdminIndex(); + admindex.show(); + }//GEN-LAST:event_jButton4MouseClicked + + private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2MouseClicked + // TODO add your handling code here: + this.hide(); + ChangePasswordAdmin cpassmin = new ChangePasswordAdmin(); + cpassmin.show(); + }//GEN-LAST:event_jButton2MouseClicked + + private void jTextField1FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField1FocusGained + // TODO add your handling code here: + jTextField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 3)); + }//GEN-LAST:event_jTextField1FocusGained + + private void jTextField1FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField1FocusLost + // TODO add your handling code here: + jTextField1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255))); + if (jTextField1.getText().equals("")) { + jTextField1.setText("Enter Print ID"); + } + }//GEN-LAST:event_jTextField1FocusLost + + private void jTextField1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTextField1MouseClicked + // TODO add your handling code here: + jTextField1.setText(""); + }//GEN-LAST:event_jTextField1MouseClicked + + private void jButton3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton3MouseClicked + // TODO add your handling code here: + this.hide(); + UserManagement usman = new UserManagement(); + usman.show(); + }//GEN-LAST:event_jButton3MouseClicked + + private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton3ActionPerformed + + private void jButton6MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton6MouseClicked + // TODO add your handling code here: + ConfirmStatChange costc = new ConfirmStatChange(); + costc.show(); + }//GEN-LAST:event_jButton6MouseClicked + + private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton6ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(UserManagement.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(UserManagement.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(UserManagement.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(UserManagement.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new UserManagement().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JButton jButton3; + private javax.swing.JButton jButton4; + private javax.swing.JButton jButton5; + private javax.swing.JButton jButton6; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel10; + private javax.swing.JLabel jLabel11; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel6; + private javax.swing.JLabel jLabel7; + private javax.swing.JLabel jLabel8; + private javax.swing.JLabel jLabel9; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JTable jTable1; + private javax.swing.JTextField jTextField1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/gui/bg2.png b/src/gui/bg2.png new file mode 100644 index 0000000..a2c56c6 Binary files /dev/null and b/src/gui/bg2.png differ diff --git a/src/job/Job.java b/src/job/Job.java new file mode 100644 index 0000000..b9b4362 --- /dev/null +++ b/src/job/Job.java @@ -0,0 +1,40 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package job; + +import File.*; +import file.MyFile; +import java.io.File; +import java.util.*; + +/** + * + * @author adwisatya + */ +public class Job { + + private String name; + private List<MyFile> file; + private static int maximum = 10; + private int nElmt; + + public Job(String name) { + this.name = name; + nElmt = 0; + } + + public void addFile(MyFile file) { + + } + + public boolean isFull() { + return nElmt == maximum; + } + + public void deleteFile(File file) { + + } +} diff --git a/src/onlineprinter/Encrypt.java b/src/onlineprinter/Encrypt.java new file mode 100644 index 0000000..1a04617 --- /dev/null +++ b/src/onlineprinter/Encrypt.java @@ -0,0 +1,49 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package onlineprinter; + +/** + * + * @author Luthfi Hamid M / 135120100 + */ +import java.security.MessageDigest; + +public class Encrypt { + + private static String convertedToHex(byte[] data) { + StringBuffer buf = new StringBuffer(); + + for (int i = 0; i < data.length; i++) { + int halfOfByte = (data[i] >>> 4) & 0x0F; + int twoHalfBytes = 0; + + do { + if ((0 <= halfOfByte) && (halfOfByte <= 9)) { + buf.append((char) ('0' + halfOfByte)); + } else { + buf.append((char) ('a' + (halfOfByte - 10))); + } + + halfOfByte = data[i] & 0x0F; + + } while (twoHalfBytes++ < 1); + } + return buf.toString(); + } + + public static String MD5(String text) { + MessageDigest md; + try { + md = MessageDigest.getInstance("MD5"); + byte[] md5 = new byte[64]; + md.update(text.getBytes("iso-8859-1"), 0, text.length()); + md5 = md.digest(); + return convertedToHex(md5); + } catch (Exception e) { + return ""; + } + } +} diff --git a/src/onlineprinter/Main.java b/src/onlineprinter/Main.java new file mode 100644 index 0000000..c27a490 --- /dev/null +++ b/src/onlineprinter/Main.java @@ -0,0 +1,11 @@ +package onlineprinter; + +public class Main { + + public static void main(String args[]) { + //FileFactory FF = new FileFactory(); + + //File A = FF.getFile("PDF"); + //A.print(); + } +} diff --git a/src/printer/Printer.java b/src/printer/Printer.java new file mode 100644 index 0000000..d194fb5 --- /dev/null +++ b/src/printer/Printer.java @@ -0,0 +1,33 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package printer; + +import java.util.*; +import job.*; + +/** + * + * @author adwisatya + */ +public class Printer { + + private String sid; + private String ip_address; + private String name; + private Queue<Job> job; + + public boolean isReady() { + return true; + } + + public void prosesQueue() { + + } + + public void addQueue(Job job) { + + } +} diff --git a/src/printer/PrinterController.java b/src/printer/PrinterController.java new file mode 100644 index 0000000..697410d --- /dev/null +++ b/src/printer/PrinterController.java @@ -0,0 +1,40 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package printer; + +import java.awt.print.PrinterException; +import java.awt.print.PrinterJob; +import java.io.IOException; +import java.lang.ProcessBuilder.Redirect.Type; +import java.util.Scanner; +import javax.print.PrintService; +import javax.print.PrintServiceLookup; +import javax.print.event.PrintServiceAttributeListener; +import org.apache.pdfbox.pdmodel.PDDocument; + +/** + * + * @author adwisatya + */ +public class PrinterController { + + public static PrintService choosePrinter() { + PrinterJob printJob = PrinterJob.getPrinterJob(); + if (printJob.printDialog()) { + return printJob.getPrintService(); + } else { + return null; + } + } + + public static void printPDF(String fileName, PrintService printer) + throws IOException, PrinterException { + PrinterJob job = PrinterJob.getPrinterJob(); + job.setPrintService(printer); + PDDocument doc = PDDocument.load(fileName); + doc.silentPrint(job); + } +} diff --git a/src/server/Server.java b/src/server/Server.java new file mode 100644 index 0000000..fe7e1c2 --- /dev/null +++ b/src/server/Server.java @@ -0,0 +1,34 @@ +package Server; + +import java.net.ServerSocket; +import java.net.Socket; + +public class Server { + + public static final int BUF_SIZE = 2048; + + public static void main(String[] args) { + Server server = new Server(); + } + + public Server() { + int portNumber = 5432; + ServerManager manager = ServerManager.getSingleton(); + try { + ServerSocket serverSocket = new ServerSocket(portNumber); + while (true) { + Socket clientSocket = serverSocket.accept(); + ServerThread ss = manager.get(clientSocket); + ss.start(); + } + } catch (Exception e) { + e.printStackTrace(); + } + } +} + +/* + + //buat kalo mau baca dari file + + */ diff --git a/src/server/ServerManager.java b/src/server/ServerManager.java new file mode 100644 index 0000000..1526de5 --- /dev/null +++ b/src/server/ServerManager.java @@ -0,0 +1,80 @@ +package Server; + +import java.net.Socket; +import java.util.ArrayList; +import java.util.List; +import job.Job; + +public class ServerManager { + + private static final int MAX_THREADS = 10; + private static int availableThreads = 10; + private static ServerManager instance; + private boolean[] available = {true, true, true, true, true, true, true, true, true, true}; + private ServerThread[] threads; + private List<String> loggedInUsers; + + public Job myJob; + + private ServerManager() { + threads = new ServerThread[MAX_THREADS]; + loggedInUsers = new ArrayList<String>(); + } + + public static ServerManager getSingleton() { + if (instance == null) { + instance = new ServerManager(); + } + return instance; + } + + public ServerThread get(Socket socket) { + int i = 0; + while (!available[i]) { + i++; + } + availableThreads--; + available[i] = false; + threads[i] = new ServerThread(socket, i); + return threads[i]; + } + + public boolean isAvailable() { + boolean found = false; + int i = 0; + while (i < MAX_THREADS && !found) { + if (available[i]) { + found = true; + } + i++; + } + return found; + } + + public void release(int id) { + availableThreads++; + available[id] = true; + try { + threads[id].join(); + } catch (Exception e) { + e.printStackTrace(); + } + threads[id] = null; + } + + public void addLoggedUser(String username) { + loggedInUsers.add(username); + System.out.println("User: " + username + " has logged in"); + } + + public void removeLoggedUser(String username) { + loggedInUsers.remove(username); + System.out.println("User: " + username + " has logged out"); + } + + public boolean isLoggedIn(String username) { + return loggedInUsers.contains(username); + + } + +} diff --git a/src/server/ServerThread.java b/src/server/ServerThread.java new file mode 100644 index 0000000..9472766 --- /dev/null +++ b/src/server/ServerThread.java @@ -0,0 +1,179 @@ +package Server; + +import entity.Credential; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.PrintWriter; +import java.net.Socket; +import java.util.*; +import entity.TransObject; +import java.io.*; +import java.net.URI; +import com.data.*; +import file.*; +import java.awt.print.PrinterJob; +import javax.print.PrintService; +import javax.print.PrintServiceLookup; +import job.*; + +public class ServerThread extends Thread { + + public static final int BUF_SIZE = 2048; + public Job myJob; + private Socket socket; + private int id; + private Credential credential; + private ObjectInputStream ois; + private PrintWriter pw; + private File file; + + + public ServerThread(Socket clientSocket, int id) { + socket = clientSocket; + this.id = id; + } + + public void run() { + try { + ois = new ObjectInputStream(socket.getInputStream()); + pw = new PrintWriter(socket.getOutputStream(), true); + Object obj = ois.readObject(); + if (obj instanceof TransObject) { + TransObject transObj = (TransObject) obj; + if (ServerManager.getSingleton().isLoggedIn(transObj.getSenderNIM())) { + writeFile(transObj); + tryprint(constructFile(transObj)); + } + } else if (obj instanceof Credential) { + System.out.println("Credential information received"); + credential = (Credential) obj; + if (checkCredential(credential)) { + if (credential.getType() == Credential.LOGIN) { + processLogin(); + } else if (credential.getType() == Credential.LOGOUT) { + processLogout(); + } else if (credential.getType() == Credential.PRINT) { + //call to method print("serverFolder/" + credential.getId() + "/" + credential.getFile()) + //myJob.print(); + } + } else { + pw.write("Wrong username or password\n"); + pw.flush(); + } + System.out.println("Message sent"); + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + if (ois != null) { + ois.close(); + pw.close(); + ServerManager.getSingleton().release(id); + } + } catch (IOException e) { + e.printStackTrace(); + } + + } + + } + + private boolean checkCredential(Credential c) { + // to be implemented with DB + UserDao Data = new UserDaoImpl(); + User user = Data.Validate(c.getId(), c.getPassword()); + return (user != null); + } + + private void writeFile(TransObject transObj){ + file = new File("serverFolder/" + transObj.getSenderNIM()); + file.mkdirs(); + file = new File(transObj.getFileName()); + try{ + InputStream in = socket.getInputStream(); //used + DataInputStream clientData = new DataInputStream(in); //used + + OutputStream output = new FileOutputStream("serverFolder/" + transObj.getSenderNIM() + "/" + file.getName()); + + byte[] buffer = new byte[BUF_SIZE]; + + int smblen; + do { + smblen = in.read(buffer); + output.write(buffer, 0, smblen); + } while (clientData.available() != 0); + output.close(); + System.out.println("User " + transObj.getSenderNIM() + " uploaded a file: " + file.getName()); + pw.write("File successfully uploaded\n"); + pw.flush(); + }catch(Exception e){ + e.printStackTrace(); + } + } + + private void tryprint(MyFile myFile){ + + PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null, null); + System.out.println("Number of print services: " + printServices.length); + int i = 1; + PrinterJob printJob = PrinterJob.getPrinterJob(); + for (PrintService printer : printServices) { + pw.write(i + ". Printer: " + printer.getName() + "\n"); + i++; + } + pw.write("Choose printer : \n"); + pw.flush(); + try{ + BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream())); + String number = br.readLine(); + //int id = Integer.parseInt(number); + //id--; + //System.out.println("selected printer: " + id); + myFile.print(printServices[4]); + }catch(Exception e){ + e.printStackTrace(); + } + } + + private MyFile constructFile(TransObject transObj){ + MyFile myFile; + FileFactory myFactory = new FileFactory(); + if (file.getName().contains(".txt")) { + myFile = myFactory.getFile("TXT"); + myFile.setEkstensi("TXT"); + } else if (file.getName().contains(".pdf")) { + myFile = myFactory.getFile("PDF"); + myFile.setEkstensi("PDF"); + } else { + myFile = myFactory.getFile("DOC"); + myFile.setEkstensi("DOC"); + } + myFile.nama = file.getName(); + myFile.uploader = transObj.getSenderNIM(); + myFile.path = file.getName(); + myFile.toPDF(); + return myFile; + } + + private void processLogin(){ + ServerManager.getSingleton().addLoggedUser(credential.getId()); + pw.write("Login sukses\n"); + pw.flush(); + UserDao data = new UserDaoImpl(); + User user = data.getByUsername(credential.getId()); + try{ + ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream()); + oos.writeObject(user); + }catch(Exception e){ + e.printStackTrace(); + } + } + + private void processLogout(){ + ServerManager.getSingleton().removeLoggedUser(credential.getId()); + pw.write("Logout sukses\n"); + pw.flush(); + } + +} diff --git a/tubes_oop.sql b/tubes_oop.sql new file mode 100644 index 0000000..9bd0ffd --- /dev/null +++ b/tubes_oop.sql @@ -0,0 +1,48 @@ +-- phpMyAdmin SQL Dump +-- version 4.1.13 +-- http://www.phpmyadmin.net +-- +-- Host: localhost +-- Generation Time: May 18, 2014 at 06:54 PM +-- Server version: 5.5.36 +-- PHP Version: 5.3.28 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + +-- +-- Database: `tubes_oop` +-- + +-- -------------------------------------------------------- + +-- +-- Table structure for table `user` +-- + +CREATE TABLE IF NOT EXISTS `user` ( + `username` varchar(30) NOT NULL, + `password` varchar(35) NOT NULL, + `nama` varchar(50) NOT NULL, + `email` varchar(50) NOT NULL, + `saldo` int(11) NOT NULL, + PRIMARY KEY (`username`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `user` +-- + +INSERT INTO `user` (`username`, `password`, `nama`, `email`, `saldo`) VALUES +('luthfi', '827ccb0eea8a706c4c34a16891f84e7b', 'Wono', 'a@yahoo.com', 50000), +('upix', '959c83618ab373ced30edb1d59bff135', 'Luthfi', 'luthfi_hamid_m@yahoo.co.id', 100000); + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;