├── .deepsource.toml
├── .github
└── workflows
│ └── maven-publish.yml
├── Architectural Diagram (Librarian Module).pdf
├── Architectural Diagram (Student Module).pdf
├── Images for ALMS
├── 200w.webp
├── Capture1.PNG
├── Capturelib.PNG
├── Google-ReCaptcha.png
├── Introimage.jpg
├── Lock.png
├── New frame.jpg
├── Statistics.jpg
├── aboutus.jpg
├── addbok.jpg
├── addstudent.png
├── collegelogo.jpg
├── images.png
├── issue.jpg
├── lock (1).png
└── returnlatest.jpg
├── LICENSE
├── README.md
├── SQLite Manager.html
├── SQLite Manager_files
├── EventEmitter.js
├── api.js
└── index.css
├── build.xml
├── manifest.mf
├── nbproject
├── build-impl.xml
├── genfiles.properties
├── project.properties
└── project.xml
└── src
├── AboutUs_rep.form
├── AboutUs_rep.java
├── About_us.form
├── About_us.java
├── BookStats.form
├── BookStats.java
├── Books.form
├── Books.java
├── Books_rep.form
├── Books_rep.java
├── COIssue_rep.form
├── COIssue_rep.java
├── COReserve_rep.form
├── COReserve_rep.java
├── COReturn_rep.form
├── COReturn_rep.java
├── Capture1.PNG
├── Capturelib.PNG
├── ChStats.form
├── ChStats.java
├── ChangePass.form
├── ChangePass.java
├── ChoiceForRecovery.form
├── ChoiceForRecovery.java
├── ChoiceOfIssue.form
├── ChoiceOfIssue.java
├── ChoiceOfReserve.form
├── ChoiceOfReserve.java
├── ChoiceOfReturn.form
├── ChoiceOfReturn.java
├── EmailF.form
├── EmailF.java
├── ExistOrNew.form
├── ExistOrNew.java
├── ExistingBook.form
├── ExistingBook.java
├── Fine.form
├── Fine.java
├── Fines2.form
├── Fines2.java
├── ForgotPasswordPage.form
├── ForgotPasswordPage.java
├── Google-ReCaptcha.png
├── Home.form
├── Home.java
├── Issue.form
├── Issue.java
├── Issue_rep.form
├── Issue_rep.java
├── JavaApplication6.xml
├── JavaConnect.java
├── Loading.form
├── Loading.java
├── LoginPage.form
├── LoginPage.java
├── MyProfile.form
├── MyProfile.java
├── MyVars.java
├── NewBook.form
├── NewBook.java
├── NewStudent.form
├── NewStudent.java
├── PHPEmailWrapper.java
├── RFIDWrapper.java
├── RequestBook.form
├── RequestBook.java
├── ReserveBook.form
├── ReserveBook.java
├── Reserve_rep.form
├── Reserve_rep.java
├── Return.form
├── Return.java
├── Return_rep.form
├── Return_rep.java
├── SearchBook.form
├── SearchBook.java
├── Search_rep.form
├── Search_rep.java
├── SignupPage.form
├── SignupPage.java
├── Stat_rep.form
├── Stat_rep.java
├── Statistics.form
├── Statistics.java
├── Stu_Dash.form
├── Stu_Dash.java
├── Verification.form
├── Verification.java
└── ardcomm.java
/.deepsource.toml:
--------------------------------------------------------------------------------
1 | version = 1
2 |
3 | [[analyzers]]
4 | name = "java"
5 |
6 | [analyzers.meta]
7 | runtime_version = "11"
--------------------------------------------------------------------------------
/.github/workflows/maven-publish.yml:
--------------------------------------------------------------------------------
1 | # This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
2 | # For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
3 |
4 | name: Maven Package
5 |
6 | on:
7 | release:
8 | types: [created]
9 |
10 | jobs:
11 | build:
12 |
13 | runs-on: ubuntu-latest
14 | permissions:
15 | contents: read
16 | packages: write
17 |
18 | steps:
19 | - uses: actions/checkout@v3
20 | - name: Set up JDK 11
21 | uses: actions/setup-java@v3
22 | with:
23 | java-version: '11'
24 | distribution: 'temurin'
25 | server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
26 | settings-path: ${{ github.workspace }} # location for the settings.xml file
27 |
28 | - name: Build with Maven
29 | run: mvn -B package --file pom.xml
30 |
31 | - name: Publish to GitHub Packages Apache Maven
32 | run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
33 | env:
34 | GITHUB_TOKEN: ${{ github.token }}
35 |
--------------------------------------------------------------------------------
/Architectural Diagram (Librarian Module).pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/Architectural Diagram (Librarian Module).pdf
--------------------------------------------------------------------------------
/Architectural Diagram (Student Module).pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/Architectural Diagram (Student Module).pdf
--------------------------------------------------------------------------------
/Images for ALMS/200w.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/Images for ALMS/200w.webp
--------------------------------------------------------------------------------
/Images for ALMS/Capture1.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/Images for ALMS/Capture1.PNG
--------------------------------------------------------------------------------
/Images for ALMS/Capturelib.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/Images for ALMS/Capturelib.PNG
--------------------------------------------------------------------------------
/Images for ALMS/Google-ReCaptcha.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/Images for ALMS/Google-ReCaptcha.png
--------------------------------------------------------------------------------
/Images for ALMS/Introimage.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/Images for ALMS/Introimage.jpg
--------------------------------------------------------------------------------
/Images for ALMS/Lock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/Images for ALMS/Lock.png
--------------------------------------------------------------------------------
/Images for ALMS/New frame.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/Images for ALMS/New frame.jpg
--------------------------------------------------------------------------------
/Images for ALMS/Statistics.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/Images for ALMS/Statistics.jpg
--------------------------------------------------------------------------------
/Images for ALMS/aboutus.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/Images for ALMS/aboutus.jpg
--------------------------------------------------------------------------------
/Images for ALMS/addbok.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/Images for ALMS/addbok.jpg
--------------------------------------------------------------------------------
/Images for ALMS/addstudent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/Images for ALMS/addstudent.png
--------------------------------------------------------------------------------
/Images for ALMS/collegelogo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/Images for ALMS/collegelogo.jpg
--------------------------------------------------------------------------------
/Images for ALMS/images.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/Images for ALMS/images.png
--------------------------------------------------------------------------------
/Images for ALMS/issue.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/Images for ALMS/issue.jpg
--------------------------------------------------------------------------------
/Images for ALMS/lock (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/Images for ALMS/lock (1).png
--------------------------------------------------------------------------------
/Images for ALMS/returnlatest.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/Images for ALMS/returnlatest.jpg
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Advanced-Library-Automation-System
2 |
3 |
4 | This is an advanced automated library software built in Java Netbeans to reduce manual efforts of the librarian, students to ensure smooth functioning of library by involving RFIDs.
5 |
6 | 
7 |
8 | ### The software comprises of two completely developed functional modules:
9 |
10 | -> Librarian Module (For Librarian's Access)
11 |
12 | -> Student Module (For Student's Access)
13 |
14 |
15 | ## Architectural Design For Librarian's Module:
16 |
17 | 
18 |
19 |
20 | ## Architectural Design For Student's Module:
21 |
22 | 
23 |
24 | 
25 |
26 | ## Librarian Dashboard:
27 | 
28 |
29 |
30 |
31 | ## Student Dashboard:
32 | 
33 |
34 |
35 | ## Additional Libraries/jar files Used:
36 |
37 | > 1. MySQL JDBC Driver
38 | > 2. JTattoo-1.6.11.jar
39 | > 3. DateChooser.jar
40 | > 4. jcalendar-1.4.jar
41 | > 5. rs2xml.jar
42 | > 6. AbsoluteLayout.jar
43 | > 7. jSerialComm-2.5.3.jar
44 |
--------------------------------------------------------------------------------
/SQLite Manager_files/EventEmitter.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /*
4 | var a = new EventEmitter({
5 | 'log-event': {
6 | first: () => console.log('we have at least one "log-event" listener. do whatever is needed'),
7 | last: () => console.log('all event listeners of type "log-event" are destroyed. do whatever is needed.')
8 | }
9 | });
10 |
11 | a.on('log-event', d => console.log('test with "ignore" condition', d)).ignore(d => d === 'ignore-me');
12 | a.on('log-event', d => console.log('test with "if" condition' ,d)).if(d => d === 'ignore-me');
13 | a.emit('log-event', 'this is a sample text');
14 | a.emit('log-event', 'ignore-me');
15 |
16 | */
17 | var EventEmitter = function(process = {}, obj) {
18 | Object.assign(this, {
19 | callbacks: {},
20 | ifs: {},
21 | ignores: {},
22 | onces: {},
23 | process
24 | }, obj);
25 | };
26 | EventEmitter.prototype.on = function(id, callback) {
27 | if (this.callbacks[id] === undefined || this.callbacks[id].length === 0) {
28 | // run constructor only once when there is at least one listener
29 | if (this.process[id] && this.process[id].first) {
30 | // console.log('first is called for', id);
31 | this.process[id].first();
32 | }
33 | this.callbacks[id] = [];
34 | this.ifs[id] = [];
35 | this.ignores[id] = [];
36 | this.onces[id] = [];
37 | }
38 | const index = this.callbacks[id].push(callback) - 1;
39 | this.ignores[id][index] = null;
40 | this.ifs[id][index] = null;
41 | return {
42 | get id() {
43 | return index;
44 | },
45 | ignore: fun => this.ignores[id][index] = fun,
46 | if: fun => this.ifs[id][index] = fun
47 | };
48 | };
49 | EventEmitter.prototype.once = function(id, callback) {
50 | const r = this.on(id, callback);
51 | this.onces[id][r.id] = true;
52 | return r;
53 | };
54 | EventEmitter.prototype.off = function(id, callback) {
55 | const index = (this.callbacks[id] || []).indexOf(callback);
56 | if (index !== -1) {
57 | this.callbacks[id].splice(index, 1);
58 | this.ignores[id].splice(index, 1);
59 | this.ifs[id].splice(index, 1);
60 | this.onces[id].splice(index, 1);
61 | // run deconstructor once there is no other listener
62 | if (this.callbacks[id].length === 0 && this.process[id] && this.process[id].last) {
63 | // console.log('last is called for', id);
64 | this.process[id].last();
65 | }
66 | }
67 | };
68 | EventEmitter.prototype.emit = function(id, ...data) {
69 | const offs = [];
70 | const rtns = (this.callbacks[id] || []).map((c, i) => {
71 | const run = () => {
72 | if (this.onces[id][i]) {
73 | offs.push(c);
74 | }
75 | return c(...data);
76 | };
77 |
78 | // ignore callback if it has ignore
79 | if (this.ignores[id][i]) {
80 | if (this.ignores[id][i](...data)) {
81 | return;
82 | }
83 | }
84 | if (this.ifs[id][i]) {
85 | if (this.ifs[id][i](...data)) {
86 | return run();
87 | }
88 | }
89 | else {
90 | return run();
91 | }
92 | });
93 | offs.forEach(c => this.off(id, c));
94 |
95 | return rtns;
96 | };
97 |
--------------------------------------------------------------------------------
/SQLite Manager_files/api.js:
--------------------------------------------------------------------------------
1 | /* globals EventEmitter */
2 |
3 | import sql from './sql.js';
4 | import chart from './chart.js';
5 | import box from './box.js';
6 | import compute from './compute.js';
7 | import tools from './tools.js';
8 | import history from './history.js';
9 | import format from './format.js';
10 | import './file.js';
11 | import Table from './table.js';
12 | import sandbox from './sandbox.js';
13 |
14 | var api = new EventEmitter();
15 | window.api = api;
16 |
17 | {
18 | const e = document.getElementById('notify');
19 | let id;
20 |
21 | api.notify = (msg, timeout = 5) => {
22 | window.clearTimeout(id);
23 | id = window.setTimeout(() => e.dataset.hidden = true, timeout * 1000);
24 | e.dataset.hidden = false;
25 | e.querySelector('span:last-child').textContent = msg;
26 | };
27 | api.notify.clean = () => {
28 | window.clearTimeout(id);
29 | e.dataset.hidden = true;
30 | };
31 | }
32 |
33 | api.require = src => new Promise(resolve => {
34 | const script = document.createElement('script');
35 | script.src = src;
36 | script.onload = () => {
37 | resolve();
38 | document.documentElement.removeChild(script);
39 | };
40 | document.documentElement.appendChild(script);
41 | });
42 |
43 | api.sql = sql;
44 | api.chart = chart;
45 | api.box = box;
46 | api.compute = compute;
47 | api.tools = tools;
48 | api.history = history;
49 | api.format = format;
50 | api.Table = Table;
51 | api.sandbox = sandbox;
52 |
53 | api.require('./index.js');
54 |
--------------------------------------------------------------------------------
/SQLite Manager_files/index.css:
--------------------------------------------------------------------------------
1 | html {
2 | height: 100%;
3 | }
4 | body {
5 | font-size: 12px;
6 | height: 100%;
7 | margin: 0;
8 | }
9 | body,
10 | pre {
11 | font-family: "Helvetica Neue",Helvetica,sans-serif !important;
12 | }
13 | select,
14 | input[type=button],
15 | input[type=submit] {
16 | border: none;
17 | margin-left: 2px;
18 | color: #000;
19 | background-color: #dedede;
20 | cursor: pointer;
21 | outline: none;
22 | }
23 | input[type=button]:active,
24 | input[type=submit]:active {
25 | opacity: 0.5;
26 | }
27 | input[type=file] {
28 | display: none;
29 | }
30 | .list {
31 | position: relative;
32 | display: inline-block;
33 | user-select: none;
34 | }
35 | .list label {
36 | cursor: pointer;
37 | }
38 | .list>span {
39 | cursor: pointer;
40 | margin-left: 5px;
41 | padding: 5px 10px;
42 | background-color: rgba(0,0,0,0.1);
43 | }
44 | .list[data-disabled=true] {
45 | pointer-events: none;
46 | }
47 | .list[data-disabled=true]>span {
48 | opacity: 0.5;
49 | }
50 | .list ul {
51 | position: absolute;
52 | top: 5px;
53 | left: 5px;
54 | z-index: 2;
55 | background-color: #fff;
56 | border: solid 1px #ebebeb;
57 | box-shadow: 1px 1px 1px rgba(0,0,0,0.05);
58 | list-style: none;
59 | list-style-position: inside;
60 | padding: 0;
61 | max-height: 80vh;
62 | overflow-y: auto;
63 | padding: 5px 0;
64 | visibility: visible;
65 | opacity: 1;
66 | }
67 | .list ul[id=history] {
68 | width: 200px;
69 | }
70 | .list ul:empty::before {
71 | content: 'Empty list';
72 | padding: 10px;
73 | white-space: nowrap;
74 | color: #ababab;
75 | font-style: italic;
76 | }
77 | .list li {
78 | padding: 3px 5px;
79 | cursor: pointer;
80 | white-space: nowrap;
81 | overflow: hidden;
82 | text-overflow: ellipsis;
83 | }
84 | .list ul:not([id=history]) li {
85 | display: flex;
86 | }
87 | .list li:not(.separator):empty {
88 | display: none;
89 | }
90 | .list li:hover {
91 | background-color: rgba(0, 0, 0, 0.1);
92 | }
93 | .list:not(:hover) ul {
94 | transition-delay: .25s;
95 | visibility: hidden;
96 | opacity: 0;
97 | }
98 | /* hide the menu when user clicks */
99 | .list:active ul {
100 | display: none;
101 | }
102 | .list li.separator {
103 | pointer-events: none;
104 | border-top: solid 1px #ebebeb;
105 | height: 5px;
106 | margin-top: 5px;
107 | }
108 | .list li.separator:empty {
109 | height: 0;
110 | padding: 2px 0 0 0;
111 | margin: 2px 0 0 0;
112 | }
113 | .list li.disabled {
114 | pointer-events: none;
115 | opacity: 0.6;
116 | justify-content: center;
117 | font-weight: 500;
118 | }
119 | .list li>span {
120 | color: #ccc;
121 | margin-left: 10px;
122 | flex: 1;
123 | text-align: right;
124 | pointer-events: none;
125 | }
126 |
127 | #tools {
128 | margin: 10px;
129 | white-space: nowrap;
130 | }
131 | #viewer {
132 | overflow-x: hidden;
133 | overflow-y: auto;
134 | }
135 |
136 | #box div[data-id="command-box"] {
137 | position: relative;
138 | margin: 10px;
139 | }
140 | #box div[data-id="command-box"]::after {
141 | content: attr(data-index);
142 | position: absolute;
143 | right: 1px;
144 | top: 1px;
145 | background-color: #75756c;
146 | color: #fff;
147 | padding: 0 2px;
148 | font-size: 9px;
149 | font-weight: 200;
150 | }
151 | #box div[data-id="command-box"]>span {
152 | position: absolute;
153 | display: inline-block;
154 | width: 8px;
155 | height: 100%;
156 | box-sizing: border-box;
157 | border: 1px solid #d3d3d3;
158 | border-right: none;
159 | }
160 | #box div[data-id="command-box"]>div {
161 | margin-left: 12px;
162 | /* Firefox */
163 | max-width: calc(100% - 12px);
164 | }
165 | #box div[data-id="command-box"] textarea {
166 | border: none;
167 | background-color: #ffffe8;
168 | outline: none;
169 | resize: none;
170 | box-sizing: border-box;
171 | }
172 | #box div[data-id="command-box"] textarea:focus {
173 | background-color: #FFFFD1;
174 | }
175 | #box div[data-id=result][data-mode=busy] {
176 | background-image: url(loading.gif);
177 | background-repeat: no-repeat;
178 | background-position: right center;
179 | min-height: 22px;
180 | }
181 | #box div[data-id=result] {
182 | overflow-x: auto;
183 | overflow-y: visible;
184 | }
185 | #box div[data-id=result] pre {
186 | white-space: pre-line;
187 | }
188 | #box div[data-id=result] pre[data-type=error] {
189 | color: red;
190 | }
191 | #box div[data-id=result] pre[data-type=sql],
192 | #box div[data-id=result] pre[data-type=note] {
193 | color: #004aff;
194 | }
195 | #box div[data-id=result] pre[data-type=warning] {
196 | color: #ccc;
197 | font-style: italic;
198 | }
199 | #box div[data-id=result] table {
200 | border-collapse: collapse;
201 | border-spacing: 0;
202 | position: relative;
203 | }
204 | #box div[data-id=result] tr:nth-child(even){
205 | background-color: rgba(0, 0, 0, 0.02);
206 | }
207 | #box div[data-id=result] tbody tr:hover {
208 | background-color: rgba(0, 0, 0, 0.1);
209 | }
210 | #box div[data-id=result] tbody tr[data-selected=true] {
211 | background-color: #5353c3;
212 | color: #fff;
213 | }
214 | #box div[data-id=result] tbody tr[data-editor=true] {
215 | background-color: #d157be;
216 | color: #fff;
217 | }
218 | #box div[data-id=result] thead th,
219 | #box div[data-id=result] tbody td {
220 | white-space: nowrap;
221 | padding: 5px;
222 | }
223 | #box div[data-id=result] tbody td:empty::before {
224 | content: 'NULL';
225 | color: #ccc;
226 | }
227 | #box div[data-id=result] thead th {
228 | background-color: rgba(0, 0, 0, 0.02);
229 | }
230 |
231 | #notify {
232 | position: fixed;
233 | right: 15px;
234 | bottom: 15px;
235 | width: 350px;
236 | height: 60px;
237 | border: solid 1px #ebebeb;
238 | }
239 | #notify[data-hidden=true] {
240 | display: none;
241 | }
242 | #notify>span {
243 | height: 100%;
244 | }
245 | #notify>span:first-child {
246 | display: inline-block;
247 | width: 80px;
248 | background: #fff url('../icons/32.png') center center no-repeat;
249 | border-right: solid 1px #ebebeb;
250 | }
251 | #notify>span:last-child {
252 | display: inline-flex;
253 | align-items: center;
254 | background-color: #ebebeb;
255 | padding-left: 10px;
256 | }
257 |
258 | #editor {
259 | position: absolute;
260 | background-color: #fff;
261 | padding: 2px;
262 | box-shadow: 1px 1px 2px 1px #e1dede;
263 | background-color: #f5f5f5;
264 | }
265 | #editor textarea {
266 | width: 300px;
267 | border: none;
268 | padding: 5px;
269 | outline: none;
270 | }
271 | #editor input {
272 | padding: 5px 10px;
273 | }
274 | #editor input:first-child {
275 | margin-bottom: 2px;
276 | }
277 | #editor[data-visible=false] {
278 | display: none;
279 | }
280 |
281 | [hbox] {
282 | display: flex;
283 | }
284 | [vbox] {
285 | display: flex;
286 | flex-direction: column;
287 | }
288 | [pack=center] {
289 | justify-content: center;
290 | }
291 | [align=start] {
292 | align-items: flex-start;
293 | }
294 | [align=center] {
295 | align-items: center;
296 | }
297 | [align=baseline] {
298 | align-items: baseline;
299 | }
300 | [align=end] {
301 | align-items: flex-end;
302 | }
303 | [flex="1"] {
304 | flex: 1;
305 | }
306 |
--------------------------------------------------------------------------------
/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Builds, tests, and runs the project Automated Library Management System.
12 |
13 |
73 |
74 |
--------------------------------------------------------------------------------
/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=2787e972
2 | build.xml.script.CRC32=2f11d1f0
3 | build.xml.stylesheet.CRC32=8064a381@1.80.1.48
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=2787e972
7 | nbproject/build-impl.xml.script.CRC32=24a310fa
8 | nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48
9 |
--------------------------------------------------------------------------------
/nbproject/project.properties:
--------------------------------------------------------------------------------
1 | annotation.processing.enabled=true
2 | annotation.processing.enabled.in.editor=false
3 | annotation.processing.processors.list=
4 | annotation.processing.run.all.processors=true
5 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
6 | application.title=Automated Library Management System
7 | application.vendor=Dev Juneja
8 | auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml
9 | build.classes.dir=${build.dir}/classes
10 | build.classes.excludes=**/*.java,**/*.form
11 | # This directory is removed when the project is cleaned:
12 | build.dir=build
13 | build.generated.dir=${build.dir}/generated
14 | build.generated.sources.dir=${build.dir}/generated-sources
15 | # Only compile against the classpath explicitly listed here:
16 | build.sysclasspath=ignore
17 | build.test.classes.dir=${build.dir}/test/classes
18 | build.test.results.dir=${build.dir}/test/results
19 | # Uncomment to specify the preferred debugger connection transport:
20 | #debug.transport=dt_socket
21 | debug.classpath=\
22 | ${run.classpath}
23 | debug.test.classpath=\
24 | ${run.test.classpath}
25 | # Files in build.classes.dir which should be excluded from distribution jar
26 | dist.archive.excludes=
27 | # This directory is removed when the project is cleaned:
28 | dist.dir=dist
29 | dist.jar=${dist.dir}/Automated_Library_Management_System.jar
30 | dist.javadoc.dir=${dist.dir}/javadoc
31 | endorsed.classpath=
32 | excludes=
33 | file.reference.DateChooser.jar=C:\\Users\\Dev Juneja\\Downloads\\1398197092_jdatechooser\\jdatechooser\\DateChooser.jar
34 | file.reference.jcalendar-1.4.jar=C:\\Users\\Dev Juneja\\Downloads\\jcalendar-1.4.jar\\jcalendar-1.4.jar
35 | file.reference.jSerialComm-2.5.3.jar=C:\\Users\\Dev Juneja\\Downloads\\jSerialComm-2.5.3.jar
36 | file.reference.JTattoo-1.6.11.jar=C:\\Users\\Dev Juneja\\Downloads\\JTattoo-1.6.11.jar
37 | file.reference.mail.jar=C:\\Users\\Dev Juneja\\Downloads\\mail.jar\\mail.jar
38 | file.reference.rs2xml.jar=C:\\Users\\Dev Juneja\\Downloads\\rs2xml.jar
39 | includes=**
40 | jar.archive.disabled=${jnlp.enabled}
41 | jar.compress=false
42 | jar.index=${jnlp.enabled}
43 | javac.classpath=\
44 | ${libs.MySQLDriver.classpath}:\
45 | ${file.reference.JTattoo-1.6.11.jar}:\
46 | ${file.reference.DateChooser.jar}:\
47 | ${file.reference.jcalendar-1.4.jar}:\
48 | ${file.reference.rs2xml.jar}:\
49 | ${libs.absolutelayout.classpath}:\
50 | ${file.reference.mail.jar}:\
51 | ${file.reference.jSerialComm-2.5.3.jar}
52 | # Space-separated list of extra javac options
53 | javac.compilerargs=
54 | javac.deprecation=false
55 | javac.external.vm=true
56 | javac.processorpath=\
57 | ${javac.classpath}
58 | javac.source=1.8
59 | javac.target=1.8
60 | javac.test.classpath=\
61 | ${javac.classpath}:\
62 | ${build.classes.dir}
63 | javac.test.processorpath=\
64 | ${javac.test.classpath}
65 | javadoc.additionalparam=
66 | javadoc.author=false
67 | javadoc.encoding=${source.encoding}
68 | javadoc.noindex=false
69 | javadoc.nonavbar=false
70 | javadoc.notree=false
71 | javadoc.private=false
72 | javadoc.splitindex=true
73 | javadoc.use=true
74 | javadoc.version=false
75 | javadoc.windowtitle=
76 | jnlp.codebase.type=no.codebase
77 | jnlp.descriptor=application
78 | jnlp.enabled=false
79 | jnlp.mixed.code=default
80 | jnlp.offline-allowed=false
81 | jnlp.signed=false
82 | jnlp.signing=
83 | jnlp.signing.alias=
84 | jnlp.signing.keystore=
85 | main.class=LoginPage
86 | # Optional override of default Application-Library-Allowable-Codebase attribute identifying the locations where your signed RIA is expected to be found.
87 | manifest.custom.application.library.allowable.codebase=
88 | # Optional override of default Caller-Allowable-Codebase attribute identifying the domains from which JavaScript code can make calls to your RIA without security prompts.
89 | manifest.custom.caller.allowable.codebase=
90 | # Optional override of default Codebase manifest attribute, use to prevent RIAs from being repurposed
91 | manifest.custom.codebase=
92 | # Optional override of default Permissions manifest attribute (supported values: sandbox, all-permissions)
93 | manifest.custom.permissions=
94 | manifest.file=manifest.mf
95 | meta.inf.dir=${src.dir}/META-INF
96 | mkdist.disabled=false
97 | platform.active=default_platform
98 | run.classpath=\
99 | ${javac.classpath}:\
100 | ${build.classes.dir}
101 | # Space-separated list of JVM arguments used when running the project.
102 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
103 | # To set system properties for unit tests define test-sys-prop.name=value:
104 | run.jvmargs=
105 | run.test.classpath=\
106 | ${javac.test.classpath}:\
107 | ${build.test.classes.dir}
108 | source.encoding=UTF-8
109 | src.dir=src
110 | test.src.dir=test
111 |
--------------------------------------------------------------------------------
/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 | Automated Library Management System
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/COIssue_rep.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
260 |
--------------------------------------------------------------------------------
/src/COIssue_rep.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this license header, choose License Headers in Project Properties.
3 | * To change this template file, choose Tools | Templates
4 | * and open the template in the editor.
5 | */
6 |
7 | /**
8 | *
9 | * @author Dev Juneja
10 | */
11 | public class COIssue_rep extends javax.swing.JFrame {
12 | MyVars wel;
13 | /**
14 | * Creates new form COIssue_rep
15 | */
16 | public COIssue_rep() {
17 | initComponents();
18 | }
19 |
20 | /**
21 | * This method is called from within the constructor to initialize the form.
22 | * WARNING: Do NOT modify this code. The content of this method is always
23 | * regenerated by the Form Editor.
24 | */
25 | @SuppressWarnings("unchecked")
26 | // //GEN-BEGIN:initComponents
27 | private void initComponents() {
28 |
29 | jPanel1 = new javax.swing.JPanel();
30 | jRadioButton1 = new javax.swing.JRadioButton();
31 | jRadioButton2 = new javax.swing.JRadioButton();
32 | jPanel4 = new javax.swing.JPanel();
33 | jButton3 = new javax.swing.JButton();
34 | jPanel3 = new javax.swing.JPanel();
35 | jButton2 = new javax.swing.JButton();
36 | jPanel2 = new javax.swing.JPanel();
37 | jLabel1 = new javax.swing.JLabel();
38 |
39 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
40 |
41 | jPanel1.setBackground(new java.awt.Color(30, 79, 94));
42 |
43 | jRadioButton1.setBackground(new java.awt.Color(30, 79, 94));
44 | jRadioButton1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
45 | jRadioButton1.setForeground(new java.awt.Color(255, 255, 255));
46 | jRadioButton1.setText("Manual");
47 | jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
48 | public void actionPerformed(java.awt.event.ActionEvent evt) {
49 | jRadioButton1ActionPerformed(evt);
50 | }
51 | });
52 |
53 | jRadioButton2.setBackground(new java.awt.Color(30, 79, 94));
54 | jRadioButton2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
55 | jRadioButton2.setForeground(new java.awt.Color(255, 255, 255));
56 | jRadioButton2.setText("RFID Tag");
57 | jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
58 | public void actionPerformed(java.awt.event.ActionEvent evt) {
59 | jRadioButton2ActionPerformed(evt);
60 | }
61 | });
62 |
63 | jPanel4.setBackground(new java.awt.Color(255, 0, 51));
64 | jPanel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
65 |
66 | jButton3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
67 | jButton3.setIcon(new javax.swing.ImageIcon("C:\\Users\\Dev Juneja\\Downloads\\icons8-back-24.png")); // NOI18N
68 | jButton3.setText("Exit");
69 | jButton3.setToolTipText("Closes the application.");
70 | jButton3.addActionListener(new java.awt.event.ActionListener() {
71 | public void actionPerformed(java.awt.event.ActionEvent evt) {
72 | jButton3ActionPerformed(evt);
73 | }
74 | });
75 |
76 | javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
77 | jPanel4.setLayout(jPanel4Layout);
78 | jPanel4Layout.setHorizontalGroup(
79 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
80 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
81 | .addGap(0, 0, Short.MAX_VALUE)
82 | .addComponent(jButton3))
83 | );
84 | jPanel4Layout.setVerticalGroup(
85 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
86 | .addGroup(jPanel4Layout.createSequentialGroup()
87 | .addContainerGap()
88 | .addComponent(jButton3)
89 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
90 | );
91 |
92 | jPanel3.setBackground(new java.awt.Color(255, 0, 51));
93 | jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
94 |
95 | jButton2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
96 | jButton2.setIcon(new javax.swing.ImageIcon("C:\\Users\\Dev Juneja\\Downloads\\icons8-back-24.png")); // NOI18N
97 | jButton2.setText("Back");
98 | jButton2.setToolTipText("Returns to the login screen.");
99 | jButton2.addActionListener(new java.awt.event.ActionListener() {
100 | public void actionPerformed(java.awt.event.ActionEvent evt) {
101 | jButton2ActionPerformed(evt);
102 | }
103 | });
104 |
105 | javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
106 | jPanel3.setLayout(jPanel3Layout);
107 | jPanel3Layout.setHorizontalGroup(
108 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
109 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
110 | .addGap(0, 0, Short.MAX_VALUE)
111 | .addComponent(jButton2))
112 | );
113 | jPanel3Layout.setVerticalGroup(
114 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
115 | .addGroup(jPanel3Layout.createSequentialGroup()
116 | .addContainerGap()
117 | .addComponent(jButton2)
118 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
119 | );
120 |
121 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
122 | jPanel1.setLayout(jPanel1Layout);
123 | jPanel1Layout.setHorizontalGroup(
124 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
125 | .addGroup(jPanel1Layout.createSequentialGroup()
126 | .addGap(135, 135, 135)
127 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
128 | .addComponent(jRadioButton1)
129 | .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
130 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 208, Short.MAX_VALUE)
131 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
132 | .addComponent(jRadioButton2)
133 | .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
134 | .addGap(140, 140, 140))
135 | );
136 | jPanel1Layout.setVerticalGroup(
137 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
138 | .addGroup(jPanel1Layout.createSequentialGroup()
139 | .addGap(36, 36, 36)
140 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
141 | .addComponent(jRadioButton1)
142 | .addComponent(jRadioButton2))
143 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 131, Short.MAX_VALUE)
144 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
145 | .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
146 | .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
147 | .addContainerGap())
148 | );
149 |
150 | jPanel2.setBackground(new java.awt.Color(0, 153, 153));
151 |
152 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N
153 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
154 | jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
155 | jLabel1.setText("Choose any one method to issue book");
156 | jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
157 |
158 | javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
159 | jPanel2.setLayout(jPanel2Layout);
160 | jPanel2Layout.setHorizontalGroup(
161 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
162 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
163 | );
164 | jPanel2Layout.setVerticalGroup(
165 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
166 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 102, Short.MAX_VALUE)
167 | );
168 |
169 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
170 | getContentPane().setLayout(layout);
171 | layout.setHorizontalGroup(
172 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
173 | .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
174 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
175 | );
176 | layout.setVerticalGroup(
177 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
178 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
179 | .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
180 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
181 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
182 | );
183 |
184 | pack();
185 | setLocationRelativeTo(null);
186 | }// //GEN-END:initComponents
187 |
188 | private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
189 | // TODO add your handling code here:
190 | setVisible(false);
191 | Issue_rep o=new Issue_rep();
192 | o.setVisible(true);
193 | }//GEN-LAST:event_jRadioButton1ActionPerformed
194 |
195 | private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton2ActionPerformed
196 | // TODO add your handling code here:
197 | setVisible(false);
198 | Issue_rep ob=new Issue_rep(wel);
199 | ob.setVisible(true);
200 | }//GEN-LAST:event_jRadioButton2ActionPerformed
201 |
202 | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
203 | // TODO add your handling code here:
204 | setVisible(false);
205 | Home ob=new Home();
206 | ob.setVisible(true);
207 | }//GEN-LAST:event_jButton2ActionPerformed
208 |
209 | private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
210 | // TODO add your handling code here:
211 | dispose();
212 | }//GEN-LAST:event_jButton3ActionPerformed
213 |
214 | /**
215 | * @param args the command line arguments
216 | */
217 | public static void main(String args[]) {
218 | /* Set the Nimbus look and feel */
219 | //
220 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
221 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
222 | */
223 | try {
224 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
225 | if ("Nimbus".equals(info.getName())) {
226 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
227 | break;
228 | }
229 | }
230 | } catch (ClassNotFoundException ex) {
231 | java.util.logging.Logger.getLogger(COIssue_rep.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
232 | } catch (InstantiationException ex) {
233 | java.util.logging.Logger.getLogger(COIssue_rep.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
234 | } catch (IllegalAccessException ex) {
235 | java.util.logging.Logger.getLogger(COIssue_rep.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
236 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
237 | java.util.logging.Logger.getLogger(COIssue_rep.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
238 | }
239 | //
240 |
241 | /* Create and display the form */
242 | java.awt.EventQueue.invokeLater(new Runnable() {
243 | public void run() {
244 | new COIssue_rep().setVisible(true);
245 | }
246 | });
247 | }
248 |
249 | // Variables declaration - do not modify//GEN-BEGIN:variables
250 | private javax.swing.JButton jButton2;
251 | private javax.swing.JButton jButton3;
252 | private javax.swing.JLabel jLabel1;
253 | private javax.swing.JPanel jPanel1;
254 | private javax.swing.JPanel jPanel2;
255 | private javax.swing.JPanel jPanel3;
256 | private javax.swing.JPanel jPanel4;
257 | private javax.swing.JRadioButton jRadioButton1;
258 | private javax.swing.JRadioButton jRadioButton2;
259 | // End of variables declaration//GEN-END:variables
260 | }
261 |
--------------------------------------------------------------------------------
/src/COReserve_rep.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
260 |
--------------------------------------------------------------------------------
/src/COReserve_rep.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this license header, choose License Headers in Project Properties.
3 | * To change this template file, choose Tools | Templates
4 | * and open the template in the editor.
5 | */
6 |
7 | /**
8 | *
9 | * @author Dev Juneja
10 | */
11 | public class COReserve_rep extends javax.swing.JFrame {
12 | MyVars wel;
13 |
14 | /**
15 | * Creates new form COReserve_rep
16 | */
17 | public COReserve_rep() {
18 | initComponents();
19 | }
20 |
21 | /**
22 | * This method is called from within the constructor to initialize the form.
23 | * WARNING: Do NOT modify this code. The content of this method is always
24 | * regenerated by the Form Editor.
25 | */
26 | @SuppressWarnings("unchecked")
27 | // //GEN-BEGIN:initComponents
28 | private void initComponents() {
29 |
30 | jPanel2 = new javax.swing.JPanel();
31 | jLabel1 = new javax.swing.JLabel();
32 | jPanel1 = new javax.swing.JPanel();
33 | jRadioButton1 = new javax.swing.JRadioButton();
34 | jRadioButton2 = new javax.swing.JRadioButton();
35 | jPanel3 = new javax.swing.JPanel();
36 | jButton2 = new javax.swing.JButton();
37 | jPanel4 = new javax.swing.JPanel();
38 | jButton3 = new javax.swing.JButton();
39 |
40 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
41 |
42 | jPanel2.setBackground(new java.awt.Color(0, 153, 153));
43 |
44 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N
45 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
46 | jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
47 | jLabel1.setText("Choose any one method to issue book");
48 | jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
49 |
50 | javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
51 | jPanel2.setLayout(jPanel2Layout);
52 | jPanel2Layout.setHorizontalGroup(
53 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
54 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
55 | );
56 | jPanel2Layout.setVerticalGroup(
57 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
58 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 102, Short.MAX_VALUE)
59 | );
60 |
61 | jPanel1.setBackground(new java.awt.Color(30, 79, 94));
62 |
63 | jRadioButton1.setBackground(new java.awt.Color(30, 79, 94));
64 | jRadioButton1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
65 | jRadioButton1.setForeground(new java.awt.Color(255, 255, 255));
66 | jRadioButton1.setText("Manual");
67 | jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
68 | public void actionPerformed(java.awt.event.ActionEvent evt) {
69 | jRadioButton1ActionPerformed(evt);
70 | }
71 | });
72 |
73 | jRadioButton2.setBackground(new java.awt.Color(30, 79, 94));
74 | jRadioButton2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
75 | jRadioButton2.setForeground(new java.awt.Color(255, 255, 255));
76 | jRadioButton2.setText("RFID Tag");
77 | jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
78 | public void actionPerformed(java.awt.event.ActionEvent evt) {
79 | jRadioButton2ActionPerformed(evt);
80 | }
81 | });
82 |
83 | jPanel3.setBackground(new java.awt.Color(255, 0, 51));
84 | jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
85 |
86 | jButton2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
87 | jButton2.setIcon(new javax.swing.ImageIcon("C:\\Users\\Dev Juneja\\Downloads\\icons8-back-24.png")); // NOI18N
88 | jButton2.setText("Back");
89 | jButton2.setToolTipText("Returns to the login screen.");
90 | jButton2.addActionListener(new java.awt.event.ActionListener() {
91 | public void actionPerformed(java.awt.event.ActionEvent evt) {
92 | jButton2ActionPerformed(evt);
93 | }
94 | });
95 |
96 | javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
97 | jPanel3.setLayout(jPanel3Layout);
98 | jPanel3Layout.setHorizontalGroup(
99 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
100 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
101 | .addGap(0, 0, Short.MAX_VALUE)
102 | .addComponent(jButton2))
103 | );
104 | jPanel3Layout.setVerticalGroup(
105 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
106 | .addGroup(jPanel3Layout.createSequentialGroup()
107 | .addContainerGap()
108 | .addComponent(jButton2)
109 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
110 | );
111 |
112 | jPanel4.setBackground(new java.awt.Color(255, 0, 51));
113 | jPanel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
114 |
115 | jButton3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
116 | jButton3.setIcon(new javax.swing.ImageIcon("C:\\Users\\Dev Juneja\\Downloads\\icons8-back-24.png")); // NOI18N
117 | jButton3.setText("Exit");
118 | jButton3.setToolTipText("Closes the application.");
119 | jButton3.addActionListener(new java.awt.event.ActionListener() {
120 | public void actionPerformed(java.awt.event.ActionEvent evt) {
121 | jButton3ActionPerformed(evt);
122 | }
123 | });
124 |
125 | javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
126 | jPanel4.setLayout(jPanel4Layout);
127 | jPanel4Layout.setHorizontalGroup(
128 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
129 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
130 | .addGap(0, 0, Short.MAX_VALUE)
131 | .addComponent(jButton3))
132 | );
133 | jPanel4Layout.setVerticalGroup(
134 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
135 | .addGroup(jPanel4Layout.createSequentialGroup()
136 | .addContainerGap()
137 | .addComponent(jButton3)
138 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
139 | );
140 |
141 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
142 | jPanel1.setLayout(jPanel1Layout);
143 | jPanel1Layout.setHorizontalGroup(
144 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
145 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
146 | .addGap(135, 135, 135)
147 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
148 | .addComponent(jRadioButton1)
149 | .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
150 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
151 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
152 | .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
153 | .addComponent(jRadioButton2))
154 | .addGap(140, 140, 140))
155 | );
156 | jPanel1Layout.setVerticalGroup(
157 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
158 | .addGroup(jPanel1Layout.createSequentialGroup()
159 | .addGap(36, 36, 36)
160 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
161 | .addComponent(jRadioButton1)
162 | .addComponent(jRadioButton2))
163 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 136, Short.MAX_VALUE)
164 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
165 | .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
166 | .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
167 | .addContainerGap())
168 | );
169 |
170 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
171 | getContentPane().setLayout(layout);
172 | layout.setHorizontalGroup(
173 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
174 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
175 | .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
176 | );
177 | layout.setVerticalGroup(
178 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
179 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
180 | .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
181 | .addGap(2, 2, 2)
182 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
183 | );
184 |
185 | pack();
186 | setLocationRelativeTo(null);
187 | }// //GEN-END:initComponents
188 |
189 | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
190 | // TODO add your handling code here:
191 | setVisible(false);
192 | Home ob=new Home();
193 | ob.setVisible(true);
194 | }//GEN-LAST:event_jButton2ActionPerformed
195 |
196 | private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
197 | // TODO add your handling code here:
198 | dispose();
199 | }//GEN-LAST:event_jButton3ActionPerformed
200 |
201 | private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
202 | // TODO add your handling code here:
203 | setVisible(false);
204 | Reserve_rep o=new Reserve_rep();
205 | o.setVisible(true);
206 | }//GEN-LAST:event_jRadioButton1ActionPerformed
207 |
208 | private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton2ActionPerformed
209 | // TODO add your handling code here:
210 | setVisible(false);
211 | Reserve_rep ob=new Reserve_rep(wel);
212 | ob.setVisible(true);
213 | }//GEN-LAST:event_jRadioButton2ActionPerformed
214 |
215 | /**
216 | * @param args the command line arguments
217 | */
218 | public static void main(String args[]) {
219 | /* Set the Nimbus look and feel */
220 | //
221 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
222 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
223 | */
224 | try {
225 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
226 | if ("Nimbus".equals(info.getName())) {
227 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
228 | break;
229 | }
230 | }
231 | } catch (ClassNotFoundException ex) {
232 | java.util.logging.Logger.getLogger(COReserve_rep.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
233 | } catch (InstantiationException ex) {
234 | java.util.logging.Logger.getLogger(COReserve_rep.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
235 | } catch (IllegalAccessException ex) {
236 | java.util.logging.Logger.getLogger(COReserve_rep.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
237 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
238 | java.util.logging.Logger.getLogger(COReserve_rep.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
239 | }
240 | //
241 |
242 | /* Create and display the form */
243 | java.awt.EventQueue.invokeLater(new Runnable() {
244 | public void run() {
245 | new COReserve_rep().setVisible(true);
246 | }
247 | });
248 | }
249 |
250 | // Variables declaration - do not modify//GEN-BEGIN:variables
251 | private javax.swing.JButton jButton2;
252 | private javax.swing.JButton jButton3;
253 | private javax.swing.JLabel jLabel1;
254 | private javax.swing.JPanel jPanel1;
255 | private javax.swing.JPanel jPanel2;
256 | private javax.swing.JPanel jPanel3;
257 | private javax.swing.JPanel jPanel4;
258 | private javax.swing.JRadioButton jRadioButton1;
259 | private javax.swing.JRadioButton jRadioButton2;
260 | // End of variables declaration//GEN-END:variables
261 | }
262 |
--------------------------------------------------------------------------------
/src/COReturn_rep.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
260 |
--------------------------------------------------------------------------------
/src/COReturn_rep.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this license header, choose License Headers in Project Properties.
3 | * To change this template file, choose Tools | Templates
4 | * and open the template in the editor.
5 | */
6 |
7 | /**
8 | *
9 | * @author Dev Juneja
10 | */
11 | public class COReturn_rep extends javax.swing.JFrame {
12 | MyVars wel;
13 |
14 | /**
15 | * Creates new form COReturn_rep
16 | */
17 | public COReturn_rep() {
18 | initComponents();
19 | }
20 |
21 | /**
22 | * This method is called from within the constructor to initialize the form.
23 | * WARNING: Do NOT modify this code. The content of this method is always
24 | * regenerated by the Form Editor.
25 | */
26 | @SuppressWarnings("unchecked")
27 | // //GEN-BEGIN:initComponents
28 | private void initComponents() {
29 |
30 | jPanel1 = new javax.swing.JPanel();
31 | jRadioButton1 = new javax.swing.JRadioButton();
32 | jRadioButton2 = new javax.swing.JRadioButton();
33 | jPanel4 = new javax.swing.JPanel();
34 | jButton3 = new javax.swing.JButton();
35 | jPanel3 = new javax.swing.JPanel();
36 | jButton2 = new javax.swing.JButton();
37 | jPanel2 = new javax.swing.JPanel();
38 | jLabel1 = new javax.swing.JLabel();
39 |
40 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
41 |
42 | jPanel1.setBackground(new java.awt.Color(30, 79, 94));
43 |
44 | jRadioButton1.setBackground(new java.awt.Color(30, 79, 94));
45 | jRadioButton1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
46 | jRadioButton1.setForeground(new java.awt.Color(255, 255, 255));
47 | jRadioButton1.setText("Manual");
48 | jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
49 | public void actionPerformed(java.awt.event.ActionEvent evt) {
50 | jRadioButton1ActionPerformed(evt);
51 | }
52 | });
53 |
54 | jRadioButton2.setBackground(new java.awt.Color(30, 79, 94));
55 | jRadioButton2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
56 | jRadioButton2.setForeground(new java.awt.Color(255, 255, 255));
57 | jRadioButton2.setText("RFID Tag");
58 | jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
59 | public void actionPerformed(java.awt.event.ActionEvent evt) {
60 | jRadioButton2ActionPerformed(evt);
61 | }
62 | });
63 |
64 | jPanel4.setBackground(new java.awt.Color(255, 0, 51));
65 | jPanel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
66 |
67 | jButton3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
68 | jButton3.setIcon(new javax.swing.ImageIcon("C:\\Users\\Dev Juneja\\Downloads\\icons8-back-24.png")); // NOI18N
69 | jButton3.setText("Exit");
70 | jButton3.setToolTipText("Closes the application.");
71 | jButton3.addActionListener(new java.awt.event.ActionListener() {
72 | public void actionPerformed(java.awt.event.ActionEvent evt) {
73 | jButton3ActionPerformed(evt);
74 | }
75 | });
76 |
77 | javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
78 | jPanel4.setLayout(jPanel4Layout);
79 | jPanel4Layout.setHorizontalGroup(
80 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
81 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
82 | .addGap(0, 0, Short.MAX_VALUE)
83 | .addComponent(jButton3))
84 | );
85 | jPanel4Layout.setVerticalGroup(
86 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
87 | .addGroup(jPanel4Layout.createSequentialGroup()
88 | .addContainerGap()
89 | .addComponent(jButton3)
90 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
91 | );
92 |
93 | jPanel3.setBackground(new java.awt.Color(255, 0, 51));
94 | jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
95 |
96 | jButton2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
97 | jButton2.setIcon(new javax.swing.ImageIcon("C:\\Users\\Dev Juneja\\Downloads\\icons8-back-24.png")); // NOI18N
98 | jButton2.setText("Back");
99 | jButton2.setToolTipText("Returns to the login screen.");
100 | jButton2.addActionListener(new java.awt.event.ActionListener() {
101 | public void actionPerformed(java.awt.event.ActionEvent evt) {
102 | jButton2ActionPerformed(evt);
103 | }
104 | });
105 |
106 | javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
107 | jPanel3.setLayout(jPanel3Layout);
108 | jPanel3Layout.setHorizontalGroup(
109 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
110 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
111 | .addGap(0, 0, Short.MAX_VALUE)
112 | .addComponent(jButton2))
113 | );
114 | jPanel3Layout.setVerticalGroup(
115 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
116 | .addGroup(jPanel3Layout.createSequentialGroup()
117 | .addContainerGap()
118 | .addComponent(jButton2)
119 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
120 | );
121 |
122 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
123 | jPanel1.setLayout(jPanel1Layout);
124 | jPanel1Layout.setHorizontalGroup(
125 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
126 | .addGroup(jPanel1Layout.createSequentialGroup()
127 | .addGap(103, 103, 103)
128 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
129 | .addComponent(jRadioButton1)
130 | .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
131 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
132 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
133 | .addComponent(jRadioButton2)
134 | .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
135 | .addGap(102, 102, 102))
136 | );
137 | jPanel1Layout.setVerticalGroup(
138 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
139 | .addGroup(jPanel1Layout.createSequentialGroup()
140 | .addGap(47, 47, 47)
141 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
142 | .addComponent(jRadioButton1)
143 | .addComponent(jRadioButton2))
144 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 113, Short.MAX_VALUE)
145 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
146 | .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
147 | .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
148 | .addContainerGap())
149 | );
150 |
151 | jPanel2.setBackground(new java.awt.Color(0, 153, 153));
152 |
153 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N
154 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
155 | jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
156 | jLabel1.setText("Choose a mode to return the book");
157 | jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
158 |
159 | javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
160 | jPanel2.setLayout(jPanel2Layout);
161 | jPanel2Layout.setHorizontalGroup(
162 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
163 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
164 | );
165 | jPanel2Layout.setVerticalGroup(
166 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
167 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 102, Short.MAX_VALUE)
168 | );
169 |
170 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
171 | getContentPane().setLayout(layout);
172 | layout.setHorizontalGroup(
173 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
174 | .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
175 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
176 | );
177 | layout.setVerticalGroup(
178 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
179 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
180 | .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
181 | .addGap(2, 2, 2)
182 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
183 | );
184 |
185 | pack();
186 | setLocationRelativeTo(null);
187 | }// //GEN-END:initComponents
188 |
189 | private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
190 | // TODO add your handling code here:
191 | setVisible(false);
192 | Return_rep o=new Return_rep();
193 | o.setVisible(true);
194 | }//GEN-LAST:event_jRadioButton1ActionPerformed
195 |
196 | private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton2ActionPerformed
197 | // TODO add your handling code here:
198 | setVisible(false);
199 | Return_rep ob=new Return_rep(wel);
200 | ob.setVisible(true);
201 | }//GEN-LAST:event_jRadioButton2ActionPerformed
202 |
203 | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
204 | // TODO add your handling code here:
205 | setVisible(false);
206 | Home ob=new Home();
207 | ob.setVisible(true);
208 | }//GEN-LAST:event_jButton2ActionPerformed
209 |
210 | private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
211 | // TODO add your handling code here:
212 | dispose();
213 | }//GEN-LAST:event_jButton3ActionPerformed
214 |
215 | /**
216 | * @param args the command line arguments
217 | */
218 | public static void main(String args[]) {
219 | /* Set the Nimbus look and feel */
220 | //
221 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
222 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
223 | */
224 | try {
225 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
226 | if ("Nimbus".equals(info.getName())) {
227 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
228 | break;
229 | }
230 | }
231 | } catch (ClassNotFoundException ex) {
232 | java.util.logging.Logger.getLogger(COReturn_rep.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
233 | } catch (InstantiationException ex) {
234 | java.util.logging.Logger.getLogger(COReturn_rep.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
235 | } catch (IllegalAccessException ex) {
236 | java.util.logging.Logger.getLogger(COReturn_rep.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
237 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
238 | java.util.logging.Logger.getLogger(COReturn_rep.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
239 | }
240 | //
241 |
242 | /* Create and display the form */
243 | java.awt.EventQueue.invokeLater(new Runnable() {
244 | public void run() {
245 | new COReturn_rep().setVisible(true);
246 | }
247 | });
248 | }
249 |
250 | // Variables declaration - do not modify//GEN-BEGIN:variables
251 | private javax.swing.JButton jButton2;
252 | private javax.swing.JButton jButton3;
253 | private javax.swing.JLabel jLabel1;
254 | private javax.swing.JPanel jPanel1;
255 | private javax.swing.JPanel jPanel2;
256 | private javax.swing.JPanel jPanel3;
257 | private javax.swing.JPanel jPanel4;
258 | private javax.swing.JRadioButton jRadioButton1;
259 | private javax.swing.JRadioButton jRadioButton2;
260 | // End of variables declaration//GEN-END:variables
261 | }
262 |
--------------------------------------------------------------------------------
/src/Capture1.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/src/Capture1.PNG
--------------------------------------------------------------------------------
/src/Capturelib.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/src/Capturelib.PNG
--------------------------------------------------------------------------------
/src/ChStats.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this license header, choose License Headers in Project Properties.
3 | * To change this template file, choose Tools | Templates
4 | * and open the template in the editor.
5 | */
6 |
7 | /**
8 | *
9 | * @author Dev Juneja
10 | */
11 | public class ChStats extends javax.swing.JFrame {
12 |
13 | /**
14 | * Creates new form ChStats
15 | */
16 | public ChStats() {
17 | initComponents();
18 | }
19 |
20 | /**
21 | * This method is called from within the constructor to initialize the form.
22 | * WARNING: Do NOT modify this code. The content of this method is always
23 | * regenerated by the Form Editor.
24 | */
25 | @SuppressWarnings("unchecked")
26 | // //GEN-BEGIN:initComponents
27 | private void initComponents() {
28 |
29 | jPanel1 = new javax.swing.JPanel();
30 | jRadioButton1 = new javax.swing.JRadioButton();
31 | jRadioButton2 = new javax.swing.JRadioButton();
32 | jPanel4 = new javax.swing.JPanel();
33 | jButton3 = new javax.swing.JButton();
34 | jPanel3 = new javax.swing.JPanel();
35 | jButton2 = new javax.swing.JButton();
36 | jPanel2 = new javax.swing.JPanel();
37 | jLabel1 = new javax.swing.JLabel();
38 |
39 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
40 | setResizable(false);
41 |
42 | jPanel1.setBackground(new java.awt.Color(30, 79, 94));
43 |
44 | jRadioButton1.setBackground(new java.awt.Color(30, 79, 94));
45 | jRadioButton1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
46 | jRadioButton1.setForeground(new java.awt.Color(255, 255, 255));
47 | jRadioButton1.setText("Requested Book");
48 | jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
49 | public void actionPerformed(java.awt.event.ActionEvent evt) {
50 | jRadioButton1ActionPerformed(evt);
51 | }
52 | });
53 |
54 | jRadioButton2.setBackground(new java.awt.Color(30, 79, 94));
55 | jRadioButton2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
56 | jRadioButton2.setForeground(new java.awt.Color(255, 255, 255));
57 | jRadioButton2.setText("Issue/Return");
58 | jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
59 | public void actionPerformed(java.awt.event.ActionEvent evt) {
60 | jRadioButton2ActionPerformed(evt);
61 | }
62 | });
63 |
64 | jPanel4.setBackground(new java.awt.Color(255, 0, 51));
65 | jPanel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
66 |
67 | jButton3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
68 | jButton3.setIcon(new javax.swing.ImageIcon("C:\\Users\\Dev Juneja\\Downloads\\icons8-back-24.png")); // NOI18N
69 | jButton3.setText("Exit");
70 | jButton3.setToolTipText("Closes the application.");
71 | jButton3.addActionListener(new java.awt.event.ActionListener() {
72 | public void actionPerformed(java.awt.event.ActionEvent evt) {
73 | jButton3ActionPerformed(evt);
74 | }
75 | });
76 |
77 | javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
78 | jPanel4.setLayout(jPanel4Layout);
79 | jPanel4Layout.setHorizontalGroup(
80 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
81 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
82 | .addGap(0, 0, Short.MAX_VALUE)
83 | .addComponent(jButton3))
84 | );
85 | jPanel4Layout.setVerticalGroup(
86 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
87 | .addGroup(jPanel4Layout.createSequentialGroup()
88 | .addContainerGap()
89 | .addComponent(jButton3)
90 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
91 | );
92 |
93 | jPanel3.setBackground(new java.awt.Color(255, 0, 51));
94 | jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
95 |
96 | jButton2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
97 | jButton2.setIcon(new javax.swing.ImageIcon("C:\\Users\\Dev Juneja\\Downloads\\icons8-back-24.png")); // NOI18N
98 | jButton2.setText("Back");
99 | jButton2.setToolTipText("Returns to the login screen.");
100 | jButton2.addActionListener(new java.awt.event.ActionListener() {
101 | public void actionPerformed(java.awt.event.ActionEvent evt) {
102 | jButton2ActionPerformed(evt);
103 | }
104 | });
105 |
106 | javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
107 | jPanel3.setLayout(jPanel3Layout);
108 | jPanel3Layout.setHorizontalGroup(
109 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
110 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
111 | .addGap(0, 0, Short.MAX_VALUE)
112 | .addComponent(jButton2))
113 | );
114 | jPanel3Layout.setVerticalGroup(
115 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
116 | .addGroup(jPanel3Layout.createSequentialGroup()
117 | .addContainerGap()
118 | .addComponent(jButton2)
119 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
120 | );
121 |
122 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
123 | jPanel1.setLayout(jPanel1Layout);
124 | jPanel1Layout.setHorizontalGroup(
125 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
126 | .addGroup(jPanel1Layout.createSequentialGroup()
127 | .addGap(85, 85, 85)
128 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
129 | .addComponent(jRadioButton1)
130 | .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
131 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 87, Short.MAX_VALUE)
132 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
133 | .addComponent(jRadioButton2)
134 | .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
135 | .addGap(72, 72, 72))
136 | );
137 | jPanel1Layout.setVerticalGroup(
138 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
139 | .addGroup(jPanel1Layout.createSequentialGroup()
140 | .addGap(66, 66, 66)
141 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
142 | .addComponent(jRadioButton1)
143 | .addComponent(jRadioButton2))
144 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 106, Short.MAX_VALUE)
145 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
146 | .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
147 | .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
148 | .addContainerGap())
149 | );
150 |
151 | jPanel2.setBackground(new java.awt.Color(0, 153, 153));
152 |
153 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N
154 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
155 | jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
156 | jLabel1.setText("Select Specific Statistics");
157 | jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
158 |
159 | javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
160 | jPanel2.setLayout(jPanel2Layout);
161 | jPanel2Layout.setHorizontalGroup(
162 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
163 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
164 | );
165 | jPanel2Layout.setVerticalGroup(
166 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
167 | .addGroup(jPanel2Layout.createSequentialGroup()
168 | .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
169 | .addGap(0, 0, Short.MAX_VALUE))
170 | );
171 |
172 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
173 | getContentPane().setLayout(layout);
174 | layout.setHorizontalGroup(
175 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
176 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
177 | .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
178 | );
179 | layout.setVerticalGroup(
180 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
181 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
182 | .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
183 | .addGap(2, 2, 2)
184 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
185 | );
186 |
187 | pack();
188 | setLocationRelativeTo(null);
189 | }// //GEN-END:initComponents
190 |
191 | private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
192 | // TODO add your handling code here:
193 | setVisible(false);
194 | BookStats o=new BookStats();
195 | o.setVisible(true);
196 | }//GEN-LAST:event_jRadioButton1ActionPerformed
197 |
198 | private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton2ActionPerformed
199 | // TODO add your handling code here:
200 | setVisible(false);
201 | Statistics ob=new Statistics();
202 | ob.setVisible(true);
203 | }//GEN-LAST:event_jRadioButton2ActionPerformed
204 |
205 | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
206 | // TODO add your handling code here:
207 | setVisible(false);
208 | LoginPage ob=new LoginPage();
209 | ob.setVisible(true);
210 | }//GEN-LAST:event_jButton2ActionPerformed
211 |
212 | private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
213 | // TODO add your handling code here:
214 | dispose();
215 | }//GEN-LAST:event_jButton3ActionPerformed
216 |
217 | /**
218 | * @param args the command line arguments
219 | */
220 | public static void main(String args[]) {
221 | /* Set the Nimbus look and feel */
222 | //
223 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
224 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
225 | */
226 | try {
227 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
228 | if ("Nimbus".equals(info.getName())) {
229 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
230 | break;
231 | }
232 | }
233 | } catch (ClassNotFoundException ex) {
234 | java.util.logging.Logger.getLogger(ChStats.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
235 | } catch (InstantiationException ex) {
236 | java.util.logging.Logger.getLogger(ChStats.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
237 | } catch (IllegalAccessException ex) {
238 | java.util.logging.Logger.getLogger(ChStats.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
239 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
240 | java.util.logging.Logger.getLogger(ChStats.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
241 | }
242 | //
243 |
244 | /* Create and display the form */
245 | java.awt.EventQueue.invokeLater(new Runnable() {
246 | public void run() {
247 | new ChStats().setVisible(true);
248 | }
249 | });
250 | }
251 |
252 | // Variables declaration - do not modify//GEN-BEGIN:variables
253 | private javax.swing.JButton jButton2;
254 | private javax.swing.JButton jButton3;
255 | private javax.swing.JLabel jLabel1;
256 | private javax.swing.JPanel jPanel1;
257 | private javax.swing.JPanel jPanel2;
258 | private javax.swing.JPanel jPanel3;
259 | private javax.swing.JPanel jPanel4;
260 | private javax.swing.JRadioButton jRadioButton1;
261 | private javax.swing.JRadioButton jRadioButton2;
262 | // End of variables declaration//GEN-END:variables
263 | }
264 |
--------------------------------------------------------------------------------
/src/ChoiceOfIssue.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this license header, choose License Headers in Project Properties.
3 | * To change this template file, choose Tools | Templates
4 | * and open the template in the editor.
5 | */
6 |
7 | /**
8 | *
9 | * @author Dev Juneja
10 | */
11 | public class ChoiceOfIssue extends javax.swing.JFrame {
12 | MyVars wel;
13 | /**
14 | * Creates new form ChoiceOfIssue
15 | */
16 | public ChoiceOfIssue() {
17 | initComponents();
18 | }
19 |
20 | /**
21 | * This method is called from within the constructor to initialize the form.
22 | * WARNING: Do NOT modify this code. The content of this method is always
23 | * regenerated by the Form Editor.
24 | */
25 | @SuppressWarnings("unchecked")
26 | // //GEN-BEGIN:initComponents
27 | private void initComponents() {
28 |
29 | jPanel1 = new javax.swing.JPanel();
30 | jRadioButton1 = new javax.swing.JRadioButton();
31 | jRadioButton2 = new javax.swing.JRadioButton();
32 | jPanel4 = new javax.swing.JPanel();
33 | jButton3 = new javax.swing.JButton();
34 | jPanel3 = new javax.swing.JPanel();
35 | jButton2 = new javax.swing.JButton();
36 | jPanel2 = new javax.swing.JPanel();
37 | jLabel1 = new javax.swing.JLabel();
38 |
39 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
40 | setResizable(false);
41 |
42 | jPanel1.setBackground(new java.awt.Color(30, 79, 94));
43 |
44 | jRadioButton1.setBackground(new java.awt.Color(30, 79, 94));
45 | jRadioButton1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
46 | jRadioButton1.setForeground(new java.awt.Color(255, 255, 255));
47 | jRadioButton1.setText("Manual");
48 | jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
49 | public void actionPerformed(java.awt.event.ActionEvent evt) {
50 | jRadioButton1ActionPerformed(evt);
51 | }
52 | });
53 |
54 | jRadioButton2.setBackground(new java.awt.Color(30, 79, 94));
55 | jRadioButton2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
56 | jRadioButton2.setForeground(new java.awt.Color(255, 255, 255));
57 | jRadioButton2.setText("RFID Tag");
58 | jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
59 | public void actionPerformed(java.awt.event.ActionEvent evt) {
60 | jRadioButton2ActionPerformed(evt);
61 | }
62 | });
63 |
64 | jPanel4.setBackground(new java.awt.Color(255, 0, 51));
65 | jPanel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
66 |
67 | jButton3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
68 | jButton3.setIcon(new javax.swing.ImageIcon("C:\\Users\\Dev Juneja\\Downloads\\icons8-back-24.png")); // NOI18N
69 | jButton3.setText("Exit");
70 | jButton3.setToolTipText("Closes the application.");
71 | jButton3.addActionListener(new java.awt.event.ActionListener() {
72 | public void actionPerformed(java.awt.event.ActionEvent evt) {
73 | jButton3ActionPerformed(evt);
74 | }
75 | });
76 |
77 | javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
78 | jPanel4.setLayout(jPanel4Layout);
79 | jPanel4Layout.setHorizontalGroup(
80 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
81 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
82 | .addGap(0, 0, Short.MAX_VALUE)
83 | .addComponent(jButton3))
84 | );
85 | jPanel4Layout.setVerticalGroup(
86 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
87 | .addGroup(jPanel4Layout.createSequentialGroup()
88 | .addContainerGap()
89 | .addComponent(jButton3)
90 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
91 | );
92 |
93 | jPanel3.setBackground(new java.awt.Color(255, 0, 51));
94 | jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
95 |
96 | jButton2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
97 | jButton2.setIcon(new javax.swing.ImageIcon("C:\\Users\\Dev Juneja\\Downloads\\icons8-back-24.png")); // NOI18N
98 | jButton2.setText("Back");
99 | jButton2.setToolTipText("Returns to the login screen.");
100 | jButton2.addActionListener(new java.awt.event.ActionListener() {
101 | public void actionPerformed(java.awt.event.ActionEvent evt) {
102 | jButton2ActionPerformed(evt);
103 | }
104 | });
105 |
106 | javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
107 | jPanel3.setLayout(jPanel3Layout);
108 | jPanel3Layout.setHorizontalGroup(
109 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
110 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
111 | .addGap(0, 0, Short.MAX_VALUE)
112 | .addComponent(jButton2))
113 | );
114 | jPanel3Layout.setVerticalGroup(
115 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
116 | .addGroup(jPanel3Layout.createSequentialGroup()
117 | .addContainerGap()
118 | .addComponent(jButton2)
119 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
120 | );
121 |
122 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
123 | jPanel1.setLayout(jPanel1Layout);
124 | jPanel1Layout.setHorizontalGroup(
125 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
126 | .addGroup(jPanel1Layout.createSequentialGroup()
127 | .addGap(135, 135, 135)
128 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
129 | .addComponent(jRadioButton1)
130 | .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
131 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
132 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
133 | .addComponent(jRadioButton2)
134 | .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
135 | .addGap(140, 140, 140))
136 | );
137 | jPanel1Layout.setVerticalGroup(
138 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
139 | .addGroup(jPanel1Layout.createSequentialGroup()
140 | .addGap(69, 69, 69)
141 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
142 | .addComponent(jRadioButton1)
143 | .addComponent(jRadioButton2))
144 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 68, Short.MAX_VALUE)
145 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
146 | .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
147 | .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
148 | .addGap(67, 67, 67))
149 | );
150 |
151 | jPanel2.setBackground(new java.awt.Color(0, 153, 153));
152 |
153 | jLabel1.setBackground(new java.awt.Color(30, 79, 94));
154 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N
155 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
156 | jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
157 | jLabel1.setText("Choose any one method to issue book");
158 | jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
159 |
160 | javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
161 | jPanel2.setLayout(jPanel2Layout);
162 | jPanel2Layout.setHorizontalGroup(
163 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
164 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
165 | );
166 | jPanel2Layout.setVerticalGroup(
167 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
168 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 102, Short.MAX_VALUE)
169 | );
170 |
171 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
172 | getContentPane().setLayout(layout);
173 | layout.setHorizontalGroup(
174 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
175 | .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
176 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
177 | );
178 | layout.setVerticalGroup(
179 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
180 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
181 | .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
182 | .addGap(2, 2, 2)
183 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
184 | );
185 |
186 | pack();
187 | setLocationRelativeTo(null);
188 | }// //GEN-END:initComponents
189 |
190 | private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
191 | // TODO add your handling code here:
192 | setVisible(false);
193 | Issue o=new Issue();
194 | o.setVisible(true);
195 | }//GEN-LAST:event_jRadioButton1ActionPerformed
196 |
197 | private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton2ActionPerformed
198 | // TODO add your handling code here:
199 | setVisible(false);
200 | Issue ob=new Issue(wel);
201 | ob.setVisible(true);
202 | }//GEN-LAST:event_jRadioButton2ActionPerformed
203 |
204 | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
205 | // TODO add your handling code here:
206 | setVisible(false);
207 | Home ob=new Home();
208 | ob.setVisible(true);
209 | }//GEN-LAST:event_jButton2ActionPerformed
210 |
211 | private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
212 | // TODO add your handling code here:
213 | dispose();
214 | }//GEN-LAST:event_jButton3ActionPerformed
215 |
216 | /**
217 | * @param args the command line arguments
218 | */
219 | public static void main(String args[]) {
220 | /* Set the Nimbus look and feel */
221 | //
222 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
223 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
224 | */
225 | try {
226 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
227 | if ("Nimbus".equals(info.getName())) {
228 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
229 | break;
230 | }
231 | }
232 | } catch (ClassNotFoundException ex) {
233 | java.util.logging.Logger.getLogger(ChoiceOfIssue.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
234 | } catch (InstantiationException ex) {
235 | java.util.logging.Logger.getLogger(ChoiceOfIssue.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
236 | } catch (IllegalAccessException ex) {
237 | java.util.logging.Logger.getLogger(ChoiceOfIssue.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
238 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
239 | java.util.logging.Logger.getLogger(ChoiceOfIssue.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
240 | }
241 | //
242 |
243 | /* Create and display the form */
244 | java.awt.EventQueue.invokeLater(new Runnable() {
245 | public void run() {
246 | new ChoiceOfIssue().setVisible(true);
247 | }
248 | });
249 | }
250 |
251 | // Variables declaration - do not modify//GEN-BEGIN:variables
252 | private javax.swing.JButton jButton2;
253 | private javax.swing.JButton jButton3;
254 | private javax.swing.JLabel jLabel1;
255 | private javax.swing.JPanel jPanel1;
256 | private javax.swing.JPanel jPanel2;
257 | private javax.swing.JPanel jPanel3;
258 | private javax.swing.JPanel jPanel4;
259 | private javax.swing.JRadioButton jRadioButton1;
260 | private javax.swing.JRadioButton jRadioButton2;
261 | // End of variables declaration//GEN-END:variables
262 | }
263 |
--------------------------------------------------------------------------------
/src/ChoiceOfReserve.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this license header, choose License Headers in Project Properties.
3 | * To change this template file, choose Tools | Templates
4 | * and open the template in the editor.
5 | */
6 |
7 | /**
8 | *
9 | * @author Dev Juneja
10 | */
11 | public class ChoiceOfReserve extends javax.swing.JFrame {
12 | MyVars wel;
13 | /**
14 | * Creates new form ChoiceOfReserve
15 | */
16 | public ChoiceOfReserve() {
17 | initComponents();
18 | }
19 |
20 | /**
21 | * This method is called from within the constructor to initialize the form.
22 | * WARNING: Do NOT modify this code. The content of this method is always
23 | * regenerated by the Form Editor.
24 | */
25 | @SuppressWarnings("unchecked")
26 | // //GEN-BEGIN:initComponents
27 | private void initComponents() {
28 |
29 | jPanel1 = new javax.swing.JPanel();
30 | jRadioButton1 = new javax.swing.JRadioButton();
31 | jRadioButton2 = new javax.swing.JRadioButton();
32 | jPanel4 = new javax.swing.JPanel();
33 | jButton3 = new javax.swing.JButton();
34 | jPanel3 = new javax.swing.JPanel();
35 | jButton2 = new javax.swing.JButton();
36 | jPanel2 = new javax.swing.JPanel();
37 | jLabel1 = new javax.swing.JLabel();
38 |
39 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
40 | setResizable(false);
41 |
42 | jPanel1.setBackground(new java.awt.Color(30, 79, 94));
43 |
44 | jRadioButton1.setBackground(new java.awt.Color(30, 79, 94));
45 | jRadioButton1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
46 | jRadioButton1.setForeground(new java.awt.Color(255, 255, 255));
47 | jRadioButton1.setText("Manual");
48 | jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
49 | public void actionPerformed(java.awt.event.ActionEvent evt) {
50 | jRadioButton1ActionPerformed(evt);
51 | }
52 | });
53 |
54 | jRadioButton2.setBackground(new java.awt.Color(30, 79, 94));
55 | jRadioButton2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
56 | jRadioButton2.setForeground(new java.awt.Color(255, 255, 255));
57 | jRadioButton2.setText("RFID Tag");
58 | jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
59 | public void actionPerformed(java.awt.event.ActionEvent evt) {
60 | jRadioButton2ActionPerformed(evt);
61 | }
62 | });
63 |
64 | jPanel4.setBackground(new java.awt.Color(255, 0, 51));
65 | jPanel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
66 |
67 | jButton3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
68 | jButton3.setIcon(new javax.swing.ImageIcon("C:\\Users\\Dev Juneja\\Downloads\\icons8-back-24.png")); // NOI18N
69 | jButton3.setText("Exit");
70 | jButton3.setToolTipText("Closes the application.");
71 | jButton3.addActionListener(new java.awt.event.ActionListener() {
72 | public void actionPerformed(java.awt.event.ActionEvent evt) {
73 | jButton3ActionPerformed(evt);
74 | }
75 | });
76 |
77 | javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
78 | jPanel4.setLayout(jPanel4Layout);
79 | jPanel4Layout.setHorizontalGroup(
80 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
81 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
82 | .addGap(0, 0, Short.MAX_VALUE)
83 | .addComponent(jButton3))
84 | );
85 | jPanel4Layout.setVerticalGroup(
86 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
87 | .addGroup(jPanel4Layout.createSequentialGroup()
88 | .addContainerGap()
89 | .addComponent(jButton3)
90 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
91 | );
92 |
93 | jPanel3.setBackground(new java.awt.Color(255, 0, 51));
94 | jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
95 |
96 | jButton2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
97 | jButton2.setIcon(new javax.swing.ImageIcon("C:\\Users\\Dev Juneja\\Downloads\\icons8-back-24.png")); // NOI18N
98 | jButton2.setText("Back");
99 | jButton2.setToolTipText("Returns to the login screen.");
100 | jButton2.addActionListener(new java.awt.event.ActionListener() {
101 | public void actionPerformed(java.awt.event.ActionEvent evt) {
102 | jButton2ActionPerformed(evt);
103 | }
104 | });
105 |
106 | javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
107 | jPanel3.setLayout(jPanel3Layout);
108 | jPanel3Layout.setHorizontalGroup(
109 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
110 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
111 | .addGap(0, 0, Short.MAX_VALUE)
112 | .addComponent(jButton2))
113 | );
114 | jPanel3Layout.setVerticalGroup(
115 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
116 | .addGroup(jPanel3Layout.createSequentialGroup()
117 | .addContainerGap()
118 | .addComponent(jButton2)
119 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
120 | );
121 |
122 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
123 | jPanel1.setLayout(jPanel1Layout);
124 | jPanel1Layout.setHorizontalGroup(
125 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
126 | .addGroup(jPanel1Layout.createSequentialGroup()
127 | .addGap(135, 135, 135)
128 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
129 | .addComponent(jRadioButton1)
130 | .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
131 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
132 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
133 | .addComponent(jRadioButton2)
134 | .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
135 | .addGap(140, 140, 140))
136 | );
137 | jPanel1Layout.setVerticalGroup(
138 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
139 | .addGroup(jPanel1Layout.createSequentialGroup()
140 | .addGap(36, 36, 36)
141 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
142 | .addComponent(jRadioButton1)
143 | .addComponent(jRadioButton2))
144 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 106, Short.MAX_VALUE)
145 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
146 | .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
147 | .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
148 | .addContainerGap())
149 | );
150 |
151 | jPanel2.setBackground(new java.awt.Color(0, 153, 153));
152 |
153 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N
154 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
155 | jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
156 | jLabel1.setText("Choose any one method to reserve book");
157 | jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
158 |
159 | javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
160 | jPanel2.setLayout(jPanel2Layout);
161 | jPanel2Layout.setHorizontalGroup(
162 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
163 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
164 | );
165 | jPanel2Layout.setVerticalGroup(
166 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
167 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 102, Short.MAX_VALUE)
168 | );
169 |
170 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
171 | getContentPane().setLayout(layout);
172 | layout.setHorizontalGroup(
173 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
174 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
175 | .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
176 | );
177 | layout.setVerticalGroup(
178 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
179 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
180 | .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
181 | .addGap(2, 2, 2)
182 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
183 | );
184 |
185 | pack();
186 | setLocationRelativeTo(null);
187 | }// //GEN-END:initComponents
188 |
189 | private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
190 | // TODO add your handling code here:
191 | setVisible(false);
192 | ReserveBook o=new ReserveBook();
193 | o.setVisible(true);
194 | }//GEN-LAST:event_jRadioButton1ActionPerformed
195 |
196 | private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton2ActionPerformed
197 | // TODO add your handling code here:
198 | setVisible(false);
199 | ReserveBook ob=new ReserveBook(wel);
200 | ob.setVisible(true);
201 | }//GEN-LAST:event_jRadioButton2ActionPerformed
202 |
203 | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
204 | // TODO add your handling code here:
205 | setVisible(false);
206 | Home ob=new Home();
207 | ob.setVisible(true);
208 | }//GEN-LAST:event_jButton2ActionPerformed
209 |
210 | private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
211 | // TODO add your handling code here:
212 | dispose();
213 | }//GEN-LAST:event_jButton3ActionPerformed
214 |
215 | /**
216 | * @param args the command line arguments
217 | */
218 | public static void main(String args[]) {
219 | /* Set the Nimbus look and feel */
220 | //
221 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
222 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
223 | */
224 | try {
225 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
226 | if ("Nimbus".equals(info.getName())) {
227 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
228 | break;
229 | }
230 | }
231 | } catch (ClassNotFoundException ex) {
232 | java.util.logging.Logger.getLogger(ChoiceOfReserve.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
233 | } catch (InstantiationException ex) {
234 | java.util.logging.Logger.getLogger(ChoiceOfReserve.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
235 | } catch (IllegalAccessException ex) {
236 | java.util.logging.Logger.getLogger(ChoiceOfReserve.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
237 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
238 | java.util.logging.Logger.getLogger(ChoiceOfReserve.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
239 | }
240 | //
241 |
242 | /* Create and display the form */
243 | java.awt.EventQueue.invokeLater(new Runnable() {
244 | public void run() {
245 | new ChoiceOfReserve().setVisible(true);
246 | }
247 | });
248 | }
249 |
250 | // Variables declaration - do not modify//GEN-BEGIN:variables
251 | private javax.swing.JButton jButton2;
252 | private javax.swing.JButton jButton3;
253 | private javax.swing.JLabel jLabel1;
254 | private javax.swing.JPanel jPanel1;
255 | private javax.swing.JPanel jPanel2;
256 | private javax.swing.JPanel jPanel3;
257 | private javax.swing.JPanel jPanel4;
258 | private javax.swing.JRadioButton jRadioButton1;
259 | private javax.swing.JRadioButton jRadioButton2;
260 | // End of variables declaration//GEN-END:variables
261 | }
262 |
--------------------------------------------------------------------------------
/src/ChoiceOfReturn.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this license header, choose License Headers in Project Properties.
3 | * To change this template file, choose Tools | Templates
4 | * and open the template in the editor.
5 | */
6 |
7 | /**
8 | *
9 | * @author Dev Juneja
10 | */
11 | public class ChoiceOfReturn extends javax.swing.JFrame {
12 | MyVars wel;
13 | /**
14 | * Creates new form ChoiceOfReturn
15 | */
16 | public ChoiceOfReturn() {
17 | initComponents();
18 | }
19 |
20 | /**
21 | * This method is called from within the constructor to initialize the form.
22 | * WARNING: Do NOT modify this code. The content of this method is always
23 | * regenerated by the Form Editor.
24 | */
25 | @SuppressWarnings("unchecked")
26 | // //GEN-BEGIN:initComponents
27 | private void initComponents() {
28 |
29 | jPanel1 = new javax.swing.JPanel();
30 | jRadioButton1 = new javax.swing.JRadioButton();
31 | jRadioButton2 = new javax.swing.JRadioButton();
32 | jPanel4 = new javax.swing.JPanel();
33 | jButton3 = new javax.swing.JButton();
34 | jPanel3 = new javax.swing.JPanel();
35 | jButton2 = new javax.swing.JButton();
36 | jPanel2 = new javax.swing.JPanel();
37 | jLabel1 = new javax.swing.JLabel();
38 |
39 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
40 | setResizable(false);
41 |
42 | jPanel1.setBackground(new java.awt.Color(30, 79, 94));
43 |
44 | jRadioButton1.setBackground(new java.awt.Color(30, 79, 94));
45 | jRadioButton1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
46 | jRadioButton1.setForeground(new java.awt.Color(255, 255, 255));
47 | jRadioButton1.setText("Manual");
48 | jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
49 | public void actionPerformed(java.awt.event.ActionEvent evt) {
50 | jRadioButton1ActionPerformed(evt);
51 | }
52 | });
53 |
54 | jRadioButton2.setBackground(new java.awt.Color(30, 79, 94));
55 | jRadioButton2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
56 | jRadioButton2.setForeground(new java.awt.Color(255, 255, 255));
57 | jRadioButton2.setText("RFID Tag");
58 | jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
59 | public void actionPerformed(java.awt.event.ActionEvent evt) {
60 | jRadioButton2ActionPerformed(evt);
61 | }
62 | });
63 |
64 | jPanel4.setBackground(new java.awt.Color(255, 0, 51));
65 | jPanel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
66 |
67 | jButton3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
68 | jButton3.setIcon(new javax.swing.ImageIcon("C:\\Users\\Dev Juneja\\Downloads\\icons8-back-24.png")); // NOI18N
69 | jButton3.setText("Exit");
70 | jButton3.setToolTipText("Closes the application.");
71 | jButton3.addActionListener(new java.awt.event.ActionListener() {
72 | public void actionPerformed(java.awt.event.ActionEvent evt) {
73 | jButton3ActionPerformed(evt);
74 | }
75 | });
76 |
77 | javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
78 | jPanel4.setLayout(jPanel4Layout);
79 | jPanel4Layout.setHorizontalGroup(
80 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
81 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
82 | .addGap(0, 0, Short.MAX_VALUE)
83 | .addComponent(jButton3))
84 | );
85 | jPanel4Layout.setVerticalGroup(
86 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
87 | .addGroup(jPanel4Layout.createSequentialGroup()
88 | .addContainerGap()
89 | .addComponent(jButton3)
90 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
91 | );
92 |
93 | jPanel3.setBackground(new java.awt.Color(255, 0, 51));
94 | jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
95 |
96 | jButton2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
97 | jButton2.setIcon(new javax.swing.ImageIcon("C:\\Users\\Dev Juneja\\Downloads\\icons8-back-24.png")); // NOI18N
98 | jButton2.setText("Back");
99 | jButton2.setToolTipText("Returns to the login screen.");
100 | jButton2.addActionListener(new java.awt.event.ActionListener() {
101 | public void actionPerformed(java.awt.event.ActionEvent evt) {
102 | jButton2ActionPerformed(evt);
103 | }
104 | });
105 |
106 | javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
107 | jPanel3.setLayout(jPanel3Layout);
108 | jPanel3Layout.setHorizontalGroup(
109 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
110 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
111 | .addGap(0, 0, Short.MAX_VALUE)
112 | .addComponent(jButton2))
113 | );
114 | jPanel3Layout.setVerticalGroup(
115 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
116 | .addGroup(jPanel3Layout.createSequentialGroup()
117 | .addContainerGap()
118 | .addComponent(jButton2)
119 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
120 | );
121 |
122 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
123 | jPanel1.setLayout(jPanel1Layout);
124 | jPanel1Layout.setHorizontalGroup(
125 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
126 | .addGroup(jPanel1Layout.createSequentialGroup()
127 | .addGap(103, 103, 103)
128 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
129 | .addComponent(jRadioButton1)
130 | .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
131 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
132 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
133 | .addComponent(jRadioButton2)
134 | .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
135 | .addGap(102, 102, 102))
136 | );
137 | jPanel1Layout.setVerticalGroup(
138 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
139 | .addGroup(jPanel1Layout.createSequentialGroup()
140 | .addGap(47, 47, 47)
141 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
142 | .addComponent(jRadioButton1)
143 | .addComponent(jRadioButton2))
144 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 123, Short.MAX_VALUE)
145 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
146 | .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
147 | .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
148 | .addContainerGap())
149 | );
150 |
151 | jPanel2.setBackground(new java.awt.Color(0, 153, 153));
152 |
153 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N
154 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
155 | jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
156 | jLabel1.setText("Choose a mode to return the book");
157 | jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
158 |
159 | javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
160 | jPanel2.setLayout(jPanel2Layout);
161 | jPanel2Layout.setHorizontalGroup(
162 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
163 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
164 | );
165 | jPanel2Layout.setVerticalGroup(
166 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
167 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 96, Short.MAX_VALUE)
168 | );
169 |
170 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
171 | getContentPane().setLayout(layout);
172 | layout.setHorizontalGroup(
173 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
174 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
175 | .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
176 | );
177 | layout.setVerticalGroup(
178 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
179 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
180 | .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
181 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
182 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
183 | );
184 |
185 | pack();
186 | setLocationRelativeTo(null);
187 | }// //GEN-END:initComponents
188 |
189 | private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
190 | // TODO add your handling code here:
191 | setVisible(false);
192 | Return o=new Return();
193 | o.setVisible(true);
194 | }//GEN-LAST:event_jRadioButton1ActionPerformed
195 |
196 | private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton2ActionPerformed
197 | // TODO add your handling code here:
198 | setVisible(false);
199 | Return ob=new Return(wel);
200 | ob.setVisible(true);
201 | }//GEN-LAST:event_jRadioButton2ActionPerformed
202 |
203 | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
204 | // TODO add your handling code here:
205 | setVisible(false);
206 | Home ob=new Home();
207 | ob.setVisible(true);
208 | }//GEN-LAST:event_jButton2ActionPerformed
209 |
210 | private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
211 | // TODO add your handling code here:
212 | dispose();
213 | }//GEN-LAST:event_jButton3ActionPerformed
214 |
215 | /**
216 | * @param args the command line arguments
217 | */
218 | public static void main(String args[]) {
219 | /* Set the Nimbus look and feel */
220 | //
221 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
222 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
223 | */
224 | try {
225 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
226 | if ("Nimbus".equals(info.getName())) {
227 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
228 | break;
229 | }
230 | }
231 | } catch (ClassNotFoundException ex) {
232 | java.util.logging.Logger.getLogger(ChoiceOfReturn.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
233 | } catch (InstantiationException ex) {
234 | java.util.logging.Logger.getLogger(ChoiceOfReturn.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
235 | } catch (IllegalAccessException ex) {
236 | java.util.logging.Logger.getLogger(ChoiceOfReturn.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
237 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
238 | java.util.logging.Logger.getLogger(ChoiceOfReturn.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
239 | }
240 | //
241 |
242 | /* Create and display the form */
243 | java.awt.EventQueue.invokeLater(new Runnable() {
244 | public void run() {
245 | new ChoiceOfReturn().setVisible(true);
246 | }
247 | });
248 | }
249 |
250 | // Variables declaration - do not modify//GEN-BEGIN:variables
251 | private javax.swing.JButton jButton2;
252 | private javax.swing.JButton jButton3;
253 | private javax.swing.JLabel jLabel1;
254 | private javax.swing.JPanel jPanel1;
255 | private javax.swing.JPanel jPanel2;
256 | private javax.swing.JPanel jPanel3;
257 | private javax.swing.JPanel jPanel4;
258 | private javax.swing.JRadioButton jRadioButton1;
259 | private javax.swing.JRadioButton jRadioButton2;
260 | // End of variables declaration//GEN-END:variables
261 | }
262 |
--------------------------------------------------------------------------------
/src/Google-ReCaptcha.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devfinwiz/ALAS/a6bbc991e2034ae5726d503b387e633eab846bfc/src/Google-ReCaptcha.png
--------------------------------------------------------------------------------
/src/JavaApplication6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | false
4 | gui
5 | C:\Users\Dev Juneja\Documents\NetBeansProjects\JavaApplication6\dist\JavaApplication6.jar
6 | C:\Users\Dev Juneja\Desktop\chech.exe
7 |
8 |
9 | .
10 | normal
11 | http://java.com/download
12 |
13 | false
14 | false
15 |
16 |
17 |
18 |
19 | false
20 | false
21 | 1.4.0
22 |
23 | preferJre
24 | 64/32
25 |
26 |
--------------------------------------------------------------------------------
/src/JavaConnect.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this license header, choose License Headers in Project Properties.
3 | * To change this template file, choose Tools | Templates
4 | * and open the template in the editor.
5 | */
6 |
7 | /**
8 | *
9 | * @author Dev Juneja
10 | */
11 | import java.sql.*;
12 | import javax.swing.JOptionPane;
13 | public class JavaConnect {
14 | Connection conn;
15 | public static Connection ConnecrDb(){
16 | try{
17 | Class.forName("com.mysql.jdbc.Driver");
18 | Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/alms?zeroDateTimeBehavior=convertToNull","root","");
19 | return conn;
20 | }
21 | catch(Exception e)
22 | {
23 | JOptionPane.showMessageDialog(null,e);
24 | return null;
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Loading.java:
--------------------------------------------------------------------------------
1 | import java.sql.Connection;
2 | import java.sql.PreparedStatement;
3 | import java.sql.ResultSet;
4 | import javax.swing.JOptionPane;
5 |
6 | /*
7 | * To change this license header, choose License Headers in Project Properties.
8 | * To change this template file, choose Tools | Templates
9 | * and open the template in the editor.
10 | */
11 |
12 | /**
13 | *
14 | * @author Dev Juneja
15 | */
16 | public class Loading extends javax.swing.JFrame implements Runnable{
17 | Connection conn;
18 | ResultSet rs;
19 | PreparedStatement pst;
20 | int Toload;
21 | int s=0;
22 | MyVars gvars;
23 | Thread th;
24 | /**
25 | * Creates new form Loading
26 | */
27 | public Loading(int toload,MyVars obj) {
28 | super("Loading");
29 | gvars=obj;
30 | // System.out.println(gvars.getUname());
31 | //System.out.println("=="+obj.getUname());
32 | initComponents();
33 | th=new Thread((Runnable)this);
34 | Toload=toload;
35 | }
36 | public void setUpLoading(){
37 | setVisible(false);
38 | th.start();
39 | }
40 | public void run(){
41 | try{
42 |
43 | for(int i=1;i<=200;i++)
44 | {
45 | s=s+1;
46 | int m=jProgressBar2.getMaximum();
47 | int v=jProgressBar2.getValue();
48 | if(v//GEN-BEGIN:initComponents
74 | private void initComponents() {
75 |
76 | jTextField1 = new javax.swing.JTextField();
77 | jPanel1 = new javax.swing.JPanel();
78 | jProgressBar1 = new javax.swing.JProgressBar();
79 | jLabel2 = new javax.swing.JLabel();
80 | jLabel3 = new javax.swing.JLabel();
81 | jLabel1 = new javax.swing.JLabel();
82 | jLabel4 = new javax.swing.JLabel();
83 | jLabel5 = new javax.swing.JLabel();
84 | jPanel2 = new javax.swing.JPanel();
85 | jProgressBar2 = new javax.swing.JProgressBar();
86 | jLabel6 = new javax.swing.JLabel();
87 | jLabel11 = new javax.swing.JLabel();
88 | jPanel5 = new javax.swing.JPanel();
89 | jLabel7 = new javax.swing.JLabel();
90 | jLabel9 = new javax.swing.JLabel();
91 | jLabel10 = new javax.swing.JLabel();
92 |
93 | jTextField1.setText("jTextField1");
94 |
95 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
96 | setBackground(new java.awt.Color(204, 255, 51));
97 | setResizable(false);
98 | getContentPane().setLayout(null);
99 |
100 | jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 0, 0), 3));
101 | jPanel1.setLayout(null);
102 |
103 | jProgressBar1.setBackground(new java.awt.Color(255, 255, 102));
104 | jProgressBar1.setStringPainted(true);
105 | jPanel1.add(jProgressBar1);
106 | jProgressBar1.setBounds(15, 180, 754, 24);
107 |
108 | jLabel2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
109 | jLabel2.setText("Almost there...");
110 | jPanel1.add(jLabel2);
111 | jLabel2.setBounds(330, 210, 133, 22);
112 |
113 | jLabel3.setIcon(new javax.swing.ImageIcon("C:\\Users\\Dev Juneja\\Downloads\\giphy.gif")); // NOI18N
114 | jPanel1.add(jLabel3);
115 | jLabel3.setBounds(194, 251, 460, 460);
116 |
117 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 30)); // NOI18N
118 | jLabel1.setForeground(new java.awt.Color(0, 153, 255));
119 | jLabel1.setText("Automated Library");
120 | jPanel1.add(jLabel1);
121 | jLabel1.setBounds(245, 21, 282, 37);
122 |
123 | jLabel4.setFont(new java.awt.Font("Tahoma", 1, 30)); // NOI18N
124 | jLabel4.setForeground(new java.awt.Color(0, 153, 255));
125 | jLabel4.setText("Of");
126 | jPanel1.add(jLabel4);
127 | jLabel4.setBounds(379, 71, 34, 37);
128 |
129 | jLabel5.setFont(new java.awt.Font("Tahoma", 1, 31)); // NOI18N
130 | jLabel5.setForeground(new java.awt.Color(255, 51, 51));
131 | jLabel5.setText("Pimrpi Chinchwad Polytechnic");
132 | jPanel1.add(jLabel5);
133 | jLabel5.setBounds(165, 109, 470, 38);
134 |
135 | getContentPane().add(jPanel1);
136 | jPanel1.setBounds(40, 50, 0, 0);
137 |
138 | jPanel2.setBackground(new java.awt.Color(0, 0, 0));
139 | jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 51, 0), 3));
140 |
141 | jProgressBar2.setBackground(new java.awt.Color(255, 0, 0));
142 | jProgressBar2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
143 | jProgressBar2.setForeground(new java.awt.Color(0, 204, 51));
144 | jProgressBar2.setStringPainted(true);
145 |
146 | jLabel6.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
147 | jLabel6.setForeground(new java.awt.Color(0, 255, 255));
148 | jLabel6.setText("Almost there...");
149 |
150 | jLabel11.setIcon(new javax.swing.ImageIcon("C:\\Users\\Dev Juneja\\Downloads\\giphy.gif")); // NOI18N
151 |
152 | javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
153 | jPanel2.setLayout(jPanel2Layout);
154 | jPanel2Layout.setHorizontalGroup(
155 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
156 | .addGroup(jPanel2Layout.createSequentialGroup()
157 | .addGap(436, 436, 436)
158 | .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 450, javax.swing.GroupLayout.PREFERRED_SIZE)
159 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
160 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
161 | .addContainerGap(354, Short.MAX_VALUE)
162 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
163 | .addComponent(jProgressBar2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 620, javax.swing.GroupLayout.PREFERRED_SIZE)
164 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
165 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
166 | .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
167 | .addGap(238, 238, 238)))
168 | .addGap(350, 350, 350))
169 | );
170 | jPanel2Layout.setVerticalGroup(
171 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
172 | .addGroup(jPanel2Layout.createSequentialGroup()
173 | .addGap(40, 40, 40)
174 | .addComponent(jProgressBar2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
175 | .addGap(20, 20, 20)
176 | .addComponent(jLabel6)
177 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
178 | .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 430, javax.swing.GroupLayout.PREFERRED_SIZE)
179 | .addContainerGap(75, Short.MAX_VALUE))
180 | );
181 |
182 | getContentPane().add(jPanel2);
183 | jPanel2.setBounds(0, 170, 1330, 630);
184 |
185 | jPanel5.setBackground(new java.awt.Color(249, 105, 14));
186 |
187 | jLabel7.setFont(new java.awt.Font("Tahoma", 1, 34)); // NOI18N
188 | jLabel7.setForeground(new java.awt.Color(0, 51, 51));
189 | jLabel7.setText("Advanced Automated Library");
190 |
191 | jLabel9.setFont(new java.awt.Font("Tahoma", 1, 34)); // NOI18N
192 | jLabel9.setForeground(new java.awt.Color(0, 51, 51));
193 | jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
194 | jLabel9.setText("Of");
195 |
196 | jLabel10.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N
197 | jLabel10.setForeground(new java.awt.Color(255, 255, 255));
198 | jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
199 | jLabel10.setText("Pimpri Chinchwad Polytechnic");
200 |
201 | javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
202 | jPanel5.setLayout(jPanel5Layout);
203 | jPanel5Layout.setHorizontalGroup(
204 | jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
205 | .addGroup(jPanel5Layout.createSequentialGroup()
206 | .addGap(0, 51, Short.MAX_VALUE)
207 | .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
208 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
209 | .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 1247, javax.swing.GroupLayout.PREFERRED_SIZE)
210 | .addContainerGap())
211 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
212 | .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 1107, javax.swing.GroupLayout.PREFERRED_SIZE)
213 | .addGap(56, 56, 56))))
214 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
215 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
216 | .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 537, javax.swing.GroupLayout.PREFERRED_SIZE)
217 | .addGap(333, 333, 333))
218 | );
219 | jPanel5Layout.setVerticalGroup(
220 | jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
221 | .addGroup(jPanel5Layout.createSequentialGroup()
222 | .addComponent(jLabel7)
223 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
224 | .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
225 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
226 | .addComponent(jLabel10)
227 | .addGap(69, 69, 69))
228 | );
229 |
230 | getContentPane().add(jPanel5);
231 | jPanel5.setBounds(0, 0, 1310, 173);
232 |
233 | setSize(new java.awt.Dimension(1287, 780));
234 | setLocationRelativeTo(null);
235 | }// //GEN-END:initComponents
236 |
237 | /**
238 | * @param args the command line arguments
239 | */
240 | public static void main(String args[]) {
241 | /* Set the Nimbus look and feel */
242 | //
243 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
244 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
245 | */
246 | try {
247 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
248 | if ("Nimbus".equals(info.getName())) {
249 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
250 | break;
251 | }
252 | }
253 | } catch (ClassNotFoundException ex) {
254 | java.util.logging.Logger.getLogger(Loading.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
255 | } catch (InstantiationException ex) {
256 | java.util.logging.Logger.getLogger(Loading.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
257 | } catch (IllegalAccessException ex) {
258 | java.util.logging.Logger.getLogger(Loading.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
259 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
260 | java.util.logging.Logger.getLogger(Loading.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
261 | }
262 | //
263 |
264 | /* Create and display the form */
265 | java.awt.EventQueue.invokeLater(new Runnable() {
266 | public void run() {
267 | new Loading(0,new MyVars()).setVisible(true);
268 | }
269 | });
270 | }
271 |
272 | // Variables declaration - do not modify//GEN-BEGIN:variables
273 | private javax.swing.JLabel jLabel1;
274 | private javax.swing.JLabel jLabel10;
275 | private javax.swing.JLabel jLabel11;
276 | private javax.swing.JLabel jLabel2;
277 | private javax.swing.JLabel jLabel3;
278 | private javax.swing.JLabel jLabel4;
279 | private javax.swing.JLabel jLabel5;
280 | private javax.swing.JLabel jLabel6;
281 | private javax.swing.JLabel jLabel7;
282 | private javax.swing.JLabel jLabel9;
283 | private javax.swing.JPanel jPanel1;
284 | private javax.swing.JPanel jPanel2;
285 | private javax.swing.JPanel jPanel5;
286 | private javax.swing.JProgressBar jProgressBar1;
287 | private javax.swing.JProgressBar jProgressBar2;
288 | private javax.swing.JTextField jTextField1;
289 | // End of variables declaration//GEN-END:variables
290 | }
291 |
--------------------------------------------------------------------------------
/src/MyVars.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this license header, choose License Headers in Project Properties.
3 | * To change this template file, choose Tools | Templates
4 | * and open the template in the editor.
5 | */
6 |
7 | /**
8 | *
9 | * @author Dev Juneja
10 | */
11 | public class MyVars {
12 | // private int id;
13 | private String uname;
14 | private String name;
15 | private String id;
16 |
17 | /**
18 | * @return the id
19 | */
20 | // public int getId() {
21 | // return id;
22 | //}
23 |
24 | /**
25 | * @param id the id to set
26 |
27 | public void setId(int id) {
28 | this.id = id;
29 | }
30 | //*
31 | /**
32 | * @return the uname
33 | */
34 | public String getUname() {
35 | return uname;
36 | }
37 | public String getName(){
38 | return name;
39 | }
40 | public String getId(){
41 | return id;
42 | }
43 | /**
44 | * @param uname the uname to set
45 | */
46 | public void setUname(String uname) {
47 | this.uname = uname;
48 | }
49 | public void setName(String name){
50 | this.name=name;
51 | }
52 | public void setId(String id){
53 | this.id=id;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/PHPEmailWrapper.java:
--------------------------------------------------------------------------------
1 | import java.io.BufferedReader;
2 | import java.io.DataOutputStream;
3 | import java.io.InputStreamReader;
4 | import java.net.HttpURLConnection;
5 | import java.net.URL;
6 | import java.net.URLEncoder;
7 | import java.util.HashMap;
8 | import java.util.Map;
9 | import java.util.Random;
10 |
11 | public class PHPEmailWrapper {
12 | String body,email,subject;
13 | public PHPEmailWrapper(String body,String email){
14 | this.body = body;
15 | this.email = email;
16 | this.subject = "Message From Advanced Library Automation System";
17 | }
18 | public PHPEmailWrapper(){
19 | }
20 | public PHPEmailWrapper(String body,String email,String subject){
21 | this.body = body;
22 | this.email = email;
23 | this.subject = subject;
24 | }
25 |
26 | public String execute(){
27 | try {
28 | URL url = new URL("http://localhost/alas/email/handler.php");
29 | HttpURLConnection connection = (HttpURLConnection) url.openConnection();
30 |
31 | connection.setRequestMethod("POST");
32 | Map params = new HashMap<>();
33 | params.put("email", email);
34 | params.put("body", body);
35 | params.put("subject", subject);
36 |
37 | StringBuilder postData = new StringBuilder();
38 | for (Map.Entry param : params.entrySet()) {
39 | if (postData.length() != 0) {
40 | postData.append('&');
41 | }
42 | postData.append(URLEncoder.encode(param.getKey(), "UTF-8"));
43 | postData.append('=');
44 | postData.append(URLEncoder.encode(String.valueOf(param.getValue()), "UTF-8"));
45 | }
46 |
47 | byte[] postDataBytes = postData.toString().getBytes("UTF-8");
48 | connection.setDoOutput(true);
49 |
50 |
51 | try (DataOutputStream writer = new DataOutputStream(connection.getOutputStream())) {
52 | writer.write(postDataBytes);
53 | writer.flush();
54 | writer.close();
55 |
56 | StringBuilder content;
57 |
58 | try (BufferedReader in = new BufferedReader(
59 | new InputStreamReader(connection.getInputStream()))) {
60 | String line;
61 | content = new StringBuilder();
62 | while ((line = in.readLine()) != null) {
63 | content.append(line);
64 | content.append(System.lineSeparator());
65 | }
66 | }
67 | //Print for debug
68 | //System.out.println(content.toString());
69 | return content.toString();
70 | } catch (Exception e){
71 | return "401";
72 | }finally {
73 | connection.disconnect();
74 | }
75 | }catch (Exception e){
76 | return "401";
77 | }
78 | }
79 |
80 | public String generateOTP(){
81 | int otp = new Random().nextInt(900000) + 100000;
82 | body = body + "
Your OTP is :- " + otp + "";
83 | String st = execute();
84 | if (st.contains("200")){
85 | return String.valueOf(otp);
86 | }else {
87 | return "402";
88 | }
89 |
90 | }
91 | /*
92 | public static void main(String[] args) {
93 | PHPEmailWrapper a = new PHPEmailWrapper("This is a test email which carries your password. From ALAS","devjuneja43@gmail.com","This is a Optional Subject!!!");
94 | System.out.println(a.generateOTP());
95 | }*/
96 | }
97 |
--------------------------------------------------------------------------------
/src/RFIDWrapper.java:
--------------------------------------------------------------------------------
1 | import com.fazecast.jSerialComm.SerialPort;
2 | import java.io.DataOutputStream;
3 | import java.sql.*;
4 | import java.util.Scanner;
5 | import javax.swing.JOptionPane;
6 |
7 | public class RFIDWrapper {
8 | public SerialPort getALASReader() {
9 | SerialPort ports[] = SerialPort.getCommPorts();
10 | SerialPort onport;
11 |
12 | for (SerialPort port : ports) {
13 | onport = port;
14 | //System.out.println("trying Port:- " + port.getSystemPortName());
15 | if (onport.openPort()) {
16 | onport.setComPortTimeouts(SerialPort.TIMEOUT_READ_SEMI_BLOCKING, 0, 0);
17 | Scanner data = new Scanner(port.getInputStream());
18 | while (data.hasNextLine()) {
19 | String msg = "";
20 | try {
21 | msg = data.nextLine();
22 | } catch (Exception e) {
23 | }
24 | if (msg.equals("ALAS COM PORT RFID")) {
25 | return onport;
26 | } else {
27 | onport.closePort();
28 | }
29 | }
30 | } else {
31 | onport = null;
32 | }
33 | }
34 | return null;
35 | }
36 |
37 | public String readCard(SerialPort sp){
38 | if (sp == null)
39 | return null;
40 | DataOutputStream out = new DataOutputStream(sp.getOutputStream());
41 | Scanner sc = new Scanner(sp.getInputStream());
42 |
43 | try{
44 | out.writeBytes("1");
45 |
46 | return sc.nextLine();
47 | }catch (Exception e) {
48 | return null;
49 | }
50 | }
51 |
52 | public String readStudCard(SerialPort sp){
53 | if (sp == null)
54 | return null;
55 | DataOutputStream out = new DataOutputStream(sp.getOutputStream());
56 | Scanner sc = new Scanner(sp.getInputStream());
57 |
58 | try{
59 | out.writeBytes("1");
60 | return sc.nextLine();
61 | }catch (Exception e) {
62 | return null;
63 | }
64 | }
65 |
66 | public int mapBookId(String rfidvalue){
67 | int bkid = 0;
68 | int count = 0;
69 | System.out.println(rfidvalue);
70 | try {
71 | Connection con = JavaConnect.ConnecrDb();
72 | Statement st = con.createStatement();
73 | System.out.println(rfidvalue);
74 | String sql = "Select * from book where rfid = '"+rfidvalue+"'";
75 | ResultSet rs = st.executeQuery(sql);
76 | while(rs.next()){
77 | count++;
78 | bkid = rs.getInt("book_id");
79 | }
80 | if (count == 0) {
81 | // JOptionPane.showMessageDialog(null,"Tag isn't registered with our system!");
82 | }//24-12*2001
83 | return bkid;
84 | } catch (Exception e) {
85 | JOptionPane.showMessageDialog(null,e);
86 | return 0;
87 | }
88 | }
89 |
90 | public int mapStudId(String rfidvalue){
91 | int bkid = 0;
92 | int count = 0;
93 | System.out.println(rfidvalue);
94 | try {
95 | Connection con = JavaConnect.ConnecrDb();
96 | Statement st = con.createStatement();
97 | System.out.println(rfidvalue);
98 | String sql = "Select * from student where rfid = '"+rfidvalue+"'";
99 | ResultSet rs = st.executeQuery(sql);
100 | while(rs.next()){
101 | count++;
102 | bkid = rs.getInt("student_id");
103 | }
104 | if (count == 0) {
105 | // JOptionPane.showMessageDialog(null,"Tag isn't registered with our system!");
106 | }//24-12*2001
107 | return bkid;
108 | } catch (Exception e) {
109 | JOptionPane.showMessageDialog(null,e);
110 | return 0;
111 | }
112 | }
113 |
114 |
115 |
116 | public static void main(String[] args) {
117 | RFIDWrapper han = new RFIDWrapper();
118 | SerialPort sp = han.getALASReader();
119 |
120 | if(sp != null){
121 | System.out.println(han.readCard(sp).trim());
122 | }else{
123 | JOptionPane.showMessageDialog(null,"Communication Port for ALAS not detected!");
124 | }
125 | }
126 |
127 | }
--------------------------------------------------------------------------------
/src/Verification.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
209 |
--------------------------------------------------------------------------------
/src/Verification.java:
--------------------------------------------------------------------------------
1 |
2 | import java.util.logging.Level;
3 | import java.util.logging.Logger;
4 | import javax.swing.JOptionPane;
5 |
6 | /*
7 | * To change this license header, choose License Headers in Project Properties.
8 | * To change this template file, choose Tools | Templates
9 | * and open the template in the editor.
10 | */
11 |
12 | /**
13 | *
14 | * @author Dev Juneja
15 | */
16 | public class Verification extends javax.swing.JFrame {
17 |
18 | /**
19 | * Creates new form Verification
20 | */
21 | public Verification() {
22 | initComponents();
23 |
24 | jLabel3.setVisible(false);
25 | }
26 |
27 | /**
28 | * This method is called from within the constructor to initialize the form.
29 | * WARNING: Do NOT modify this code. The content of this method is always
30 | * regenerated by the Form Editor.
31 | */
32 | @SuppressWarnings("unchecked")
33 | // //GEN-BEGIN:initComponents
34 | private void initComponents() {
35 |
36 | jPanel1 = new javax.swing.JPanel();
37 | jLabel1 = new javax.swing.JLabel();
38 | jLabel2 = new javax.swing.JLabel();
39 | jPanel3 = new javax.swing.JPanel();
40 | jPasswordField1 = new javax.swing.JPasswordField();
41 | jLabel3 = new javax.swing.JLabel();
42 | jPanel2 = new javax.swing.JPanel();
43 | jButton1 = new javax.swing.JButton();
44 |
45 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
46 | setPreferredSize(new java.awt.Dimension(855, 517));
47 | setResizable(false);
48 |
49 | jPanel1.setBackground(new java.awt.Color(0, 153, 153));
50 |
51 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N
52 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
53 | jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
54 | jLabel1.setText("Enter valid password to verify authenticity:");
55 |
56 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
57 | jPanel1.setLayout(jPanel1Layout);
58 | jPanel1Layout.setHorizontalGroup(
59 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
60 | .addGroup(jPanel1Layout.createSequentialGroup()
61 | .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 871, javax.swing.GroupLayout.PREFERRED_SIZE)
62 | .addGap(0, 0, Short.MAX_VALUE))
63 | );
64 | jPanel1Layout.setVerticalGroup(
65 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
66 | .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
67 | );
68 |
69 | jPanel3.setBackground(new java.awt.Color(30, 79, 94));
70 |
71 | jPasswordField1.setToolTipText("");
72 | jPasswordField1.addActionListener(new java.awt.event.ActionListener() {
73 | public void actionPerformed(java.awt.event.ActionEvent evt) {
74 | jPasswordField1ActionPerformed(evt);
75 | }
76 | });
77 |
78 | jLabel3.setIcon(new javax.swing.ImageIcon("C:\\Users\\Dev Juneja\\Downloads\\wrong-answer-animation-gif-7.gif")); // NOI18N
79 |
80 | jPanel2.setBackground(new java.awt.Color(255, 0, 102));
81 | jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
82 |
83 | jButton1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
84 | jButton1.setIcon(new javax.swing.ImageIcon("C:\\Users\\Dev Juneja\\Downloads\\icons8-back-24.png")); // NOI18N
85 | jButton1.setText("Back");
86 | jButton1.addActionListener(new java.awt.event.ActionListener() {
87 | public void actionPerformed(java.awt.event.ActionEvent evt) {
88 | jButton1ActionPerformed(evt);
89 | }
90 | });
91 |
92 | javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
93 | jPanel2.setLayout(jPanel2Layout);
94 | jPanel2Layout.setHorizontalGroup(
95 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
96 | .addGroup(jPanel2Layout.createSequentialGroup()
97 | .addGap(33, 33, 33)
98 | .addComponent(jButton1)
99 | .addContainerGap(40, Short.MAX_VALUE))
100 | );
101 | jPanel2Layout.setVerticalGroup(
102 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
103 | .addGroup(jPanel2Layout.createSequentialGroup()
104 | .addContainerGap()
105 | .addComponent(jButton1)
106 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
107 | );
108 |
109 | javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
110 | jPanel3.setLayout(jPanel3Layout);
111 | jPanel3Layout.setHorizontalGroup(
112 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
113 | .addGroup(jPanel3Layout.createSequentialGroup()
114 | .addGap(221, 221, 221)
115 | .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
116 | .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
117 | .addGroup(jPanel3Layout.createSequentialGroup()
118 | .addGap(9, 9, 9)
119 | .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 399, javax.swing.GroupLayout.PREFERRED_SIZE)
120 | .addGap(0, 24, Short.MAX_VALUE)))
121 | .addGap(230, 230, 230))
122 | .addGroup(jPanel3Layout.createSequentialGroup()
123 | .addGap(330, 330, 330)
124 | .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
125 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
126 | );
127 | jPanel3Layout.setVerticalGroup(
128 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
129 | .addGroup(jPanel3Layout.createSequentialGroup()
130 | .addGap(34, 34, 34)
131 | .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
132 | .addGap(55, 55, 55)
133 | .addComponent(jLabel3)
134 | .addGap(28, 28, 28)
135 | .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
136 | .addContainerGap(243, Short.MAX_VALUE))
137 | );
138 |
139 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
140 | getContentPane().setLayout(layout);
141 | layout.setHorizontalGroup(
142 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
143 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
144 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
145 | .addComponent(jLabel2)
146 | .addGap(803, 803, 803))
147 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
148 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
149 | .addContainerGap())
150 | .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
151 | );
152 | layout.setVerticalGroup(
153 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
154 | .addGroup(layout.createSequentialGroup()
155 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
156 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
157 | .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
158 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
159 | .addComponent(jLabel2)
160 | .addGap(21, 21, 21))
161 | );
162 |
163 | setSize(new java.awt.Dimension(884, 564));
164 | setLocationRelativeTo(null);
165 | }// //GEN-END:initComponents
166 |
167 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
168 | // TODO add your handling code here:
169 | setVisible(false);
170 | LoginPage ob=new LoginPage();
171 | ob.setVisible(true);
172 | }//GEN-LAST:event_jButton1ActionPerformed
173 |
174 | private void jPasswordField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jPasswordField1ActionPerformed
175 | // TODO add your handling code here:
176 | if("DJ@2412".equals(jPasswordField1.getText())){
177 |
178 | //JOptionPane.showMessageDialog(null,"Access Granted");
179 | setVisible(false);
180 | SignupPage ob=new SignupPage();
181 | ob.setVisible(true);
182 | }
183 | else{
184 | jLabel3.setVisible(true);
185 | // JOptionPane.showMessageDialog(null,"Access Denied!");
186 | }
187 | }//GEN-LAST:event_jPasswordField1ActionPerformed
188 |
189 | /**
190 | * @param args the command line arguments
191 | */
192 | public static void main(String args[]) {
193 | /* Set the Nimbus look and feel */
194 | //
195 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
196 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
197 | */
198 | try {
199 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
200 | if ("Nimbus".equals(info.getName())) {
201 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
202 | break;
203 | }
204 | }
205 | } catch (ClassNotFoundException ex) {
206 | java.util.logging.Logger.getLogger(Verification.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
207 | } catch (InstantiationException ex) {
208 | java.util.logging.Logger.getLogger(Verification.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
209 | } catch (IllegalAccessException ex) {
210 | java.util.logging.Logger.getLogger(Verification.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
211 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
212 | java.util.logging.Logger.getLogger(Verification.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
213 | }
214 | //
215 |
216 | /* Create and display the form */
217 | java.awt.EventQueue.invokeLater(new Runnable() {
218 | public void run() {
219 | new Verification().setVisible(true);
220 | }
221 | });
222 | }
223 |
224 | // Variables declaration - do not modify//GEN-BEGIN:variables
225 | private javax.swing.JButton jButton1;
226 | private javax.swing.JLabel jLabel1;
227 | private javax.swing.JLabel jLabel2;
228 | private javax.swing.JLabel jLabel3;
229 | private javax.swing.JPanel jPanel1;
230 | private javax.swing.JPanel jPanel2;
231 | private javax.swing.JPanel jPanel3;
232 | private javax.swing.JPasswordField jPasswordField1;
233 | // End of variables declaration//GEN-END:variables
234 | }
235 |
--------------------------------------------------------------------------------
/src/ardcomm.java:
--------------------------------------------------------------------------------
1 | import com.fazecast.jSerialComm.SerialPort;
2 |
3 | import javax.swing.*;
4 | import java.util.Scanner;
5 |
6 | public class ardcomm {
7 |
8 | public static void main(String[] args) {
9 | // create a window with a slider
10 | JFrame window = new JFrame();
11 | JSlider slider = new JSlider();
12 | slider.setMaximum(1023);
13 | window.add(slider);
14 | window.pack();
15 | window.setVisible(true);
16 |
17 | // determine which serial port to use
18 | SerialPort ports[] = SerialPort.getCommPorts();
19 | System.out.println("Select a port:");
20 | int i = 1;
21 | for(SerialPort port : ports) {
22 | System.out.println(i++ + ". " + port.getSystemPortName());
23 | }
24 | Scanner s = new Scanner(System.in);
25 | int chosenPort = s.nextInt();
26 |
27 | // open and configure the port
28 | SerialPort port = ports[chosenPort - 1];
29 | if(port.openPort()) {
30 | System.out.println("Successfully opened the port.");
31 | } else {
32 | System.out.println("Unable to open the port.");
33 | return;
34 | }
35 | port.setComPortTimeouts(SerialPort.TIMEOUT_READ_SEMI_BLOCKING, 0, 0);
36 |
37 | // enter into an infinite loop that reads from the port and updates the GUI
38 | Scanner data = new Scanner(port.getInputStream());
39 | while(data.hasNextLine()) {
40 | int number = 0;
41 | String str="";
42 | try{str = data.nextLine();}catch(Exception e){}
43 | //slider.setValue(number);
44 | System.out.println(str);
45 | }
46 | }
47 |
48 | }
--------------------------------------------------------------------------------