├── MallaComputers_database.CSV ├── README.md ├── build.xml ├── build ├── built-jar.properties └── classes │ ├── .netbeans_automatic_build │ ├── .netbeans_update_resources │ └── AppliancesInfo │ ├── AppliancesInfo$1.class │ ├── AppliancesInfo$10.class │ ├── AppliancesInfo$11.class │ ├── AppliancesInfo$12.class │ ├── AppliancesInfo$13.class │ ├── AppliancesInfo$14.class │ ├── AppliancesInfo$15.class │ ├── AppliancesInfo$16.class │ ├── AppliancesInfo$17.class │ ├── AppliancesInfo$18.class │ ├── AppliancesInfo$19.class │ ├── AppliancesInfo$2.class │ ├── AppliancesInfo$20.class │ ├── AppliancesInfo$21.class │ ├── AppliancesInfo$22.class │ ├── AppliancesInfo$23.class │ ├── AppliancesInfo$24.class │ ├── AppliancesInfo$3.class │ ├── AppliancesInfo$4.class │ ├── AppliancesInfo$5.class │ ├── AppliancesInfo$6.class │ ├── AppliancesInfo$7.class │ ├── AppliancesInfo$8.class │ ├── AppliancesInfo$9.class │ ├── AppliancesInfo.class │ ├── AppliancesInfo.form │ └── TableRows.class ├── dist ├── Appliances_IS.jar └── README.TXT ├── manifest.mf ├── nbproject ├── build-impl.xml ├── genfiles.properties ├── private │ ├── private.properties │ └── private.xml ├── project.properties └── project.xml ├── rights_reserved.pdf ├── src └── AppliancesInfo │ ├── AppliancesInfo.form │ ├── AppliancesInfo.java │ └── TableRows.java └── usermanual.pdf /MallaComputers_database.CSV: -------------------------------------------------------------------------------- 1 | L1002,Microsoft Software Surface Pro 7,Business,Budget,Laptop,589 2 | L1012,Dell Inspire 13 5000 (5391),Home use,Budget,Laptop,599 3 | L1010,HP Pavilion x360,Home use,Budget,Convertible,620 4 | L1009,Acer Aspire 3,Home use,Budget,Laptop,620 5 | L1005,Dell G3 15,Gaming,Budget,Laptop,729 6 | L1020,Lenovo Ideapad 7,Customized,Budget,Laptop,800 7 | L1011,Acer Swift 3,Home use,Budget,Laptop,864 8 | L1013,Apple MacBook Air,High performance,Budget,Laptop,999 9 | L1014,Dell XPS 15,High performance,Mid,Laptop,1149 10 | L1015,HP spectre x360,High performance,Mid,Laptop,1149 11 | L1019,Lenovo Chromebook C340-11,Customized,Mid,Laptop,1200 12 | L1018,Dell Chromebook 3100 Education,Customized,Mid,Laptop,1200 13 | L1007,Asus Rog Zephyrus G14,Gaming,Mid,Laptop,1269 14 | L1006,Acer Predator Helios 300,Gaming,Mid,Laptop,1269 15 | L1008,MSI gs65 Stealth Thin,Gaming,Mid,Laptop,1599 16 | L1001,FTP Elite Dragonfly,Business,Mid,Laptop,1799 17 | L1003,Dell Latitude 9410 2-in-1,Business,Mid,Convertible,1799 18 | L1004,Acer Nitro 5,Gaming,High,Laptop,2200 19 | L1000,Lenovo ThinkPad x1 Carbon (8th Gen) ,Business,High,Laptop,2200 20 | L1016,Lg gram 17,High performance,High,Convertible,2500 21 | L1017,Asus Vivobook 15.6 inch,Customized,High,Convertible,2600 22 | L1021,HP Omen Obelisk,Customized,High,Desktop,2700 23 | L1022,iMac 21.54K,High performance,High,Desktop,5400 24 | L1023,iMac 2019 24 inch,High performance,High,Desktop,6200 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Laptop-Inventory-System--Java-programming 2 | An inventory system made using java programming language that stores the details and prices of various laptops. 3 | -------------------------------------------------------------------------------- /build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Builds, tests, and runs the project Appliances_IS. 12 | 13 | 73 | 74 | -------------------------------------------------------------------------------- /build/built-jar.properties: -------------------------------------------------------------------------------- 1 | #Fri, 15 Jan 2021 17:48:31 +0545 2 | 3 | 4 | C\:\\Users\\Aadesh\\Desktop\\Classes\\Emerging\\Java\\Appliances_IS= 5 | -------------------------------------------------------------------------------- /build/classes/.netbeans_automatic_build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/.netbeans_automatic_build -------------------------------------------------------------------------------- /build/classes/.netbeans_update_resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/.netbeans_update_resources -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$1.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$10.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$10.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$11.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$11.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$12.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$12.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$13.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$13.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$14.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$14.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$15.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$15.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$16.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$16.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$17.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$17.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$18.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$18.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$19.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$19.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$2.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$20.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$20.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$21.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$21.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$22.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$22.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$23.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$23.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$24.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$24.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$3.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$4.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$4.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$5.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$5.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$6.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$6.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$7.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$7.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$8.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$8.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo$9.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo$9.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/AppliancesInfo.class -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/AppliancesInfo.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 |
461 |
462 | 463 | 464 | 465 | 466 | <Editor/> 467 | <Renderer/> 468 | </Column> 469 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 470 | <Title/> 471 | <Editor/> 472 | <Renderer/> 473 | </Column> 474 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 475 | <Title/> 476 | <Editor/> 477 | <Renderer/> 478 | </Column> 479 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 480 | <Title/> 481 | <Editor/> 482 | <Renderer/> 483 | </Column> 484 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 485 | <Title/> 486 | <Editor/> 487 | <Renderer/> 488 | </Column> 489 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 490 | <Title/> 491 | <Editor/> 492 | <Renderer/> 493 | </Column> 494 | </TableColumnModel> 495 | </Property> 496 | <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> 497 | <TableHeader reorderingAllowed="true" resizingAllowed="true"/> 498 | </Property> 499 | </Properties> 500 | </Component> 501 | </SubComponents> 502 | </Container> 503 | </SubComponents> 504 | </Container> 505 | <Container class="javax.swing.JPanel" name="jPanel2"> 506 | <Properties> 507 | <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> 508 | <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> 509 | <TitledBorder title="Search"> 510 | <Border PropertyName="innerBorder" info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> 511 | <BevelBorder/> 512 | </Border> 513 | </TitledBorder> 514 | </Border> 515 | </Property> 516 | </Properties> 517 | 518 | <Layout> 519 | <DimensionLayout dim="0"> 520 | <Group type="103" groupAlignment="0" attributes="0"> 521 | <Group type="102" alignment="0" attributes="0"> 522 | <EmptySpace max="-2" attributes="0"/> 523 | <Group type="103" groupAlignment="0" attributes="0"> 524 | <Group type="102" alignment="0" attributes="0"> 525 | <Component id="priceSrch_Btn" min="-2" pref="213" max="-2" attributes="0"/> 526 | <EmptySpace min="-2" pref="32" max="-2" attributes="0"/> 527 | <Component id="SortList_Btn" min="-2" pref="127" max="-2" attributes="0"/> 528 | <EmptySpace max="32767" attributes="0"/> 529 | <Component id="totalDevice" min="-2" pref="127" max="-2" attributes="0"/> 530 | <EmptySpace min="-2" pref="83" max="-2" attributes="0"/> 531 | </Group> 532 | <Group type="102" alignment="0" attributes="0"> 533 | <Group type="103" groupAlignment="0" attributes="0"> 534 | <Component id="jLabel6" alignment="0" min="-2" max="-2" attributes="0"/> 535 | <Component id="jLabel7" alignment="0" min="-2" max="-2" attributes="0"/> 536 | </Group> 537 | <EmptySpace min="-2" pref="47" max="-2" attributes="0"/> 538 | <Group type="103" groupAlignment="0" max="-2" attributes="0"> 539 | <Component id="categorySearch_CB" pref="177" max="32767" attributes="0"/> 540 | <Component id="priceSrch_TF" max="32767" attributes="0"/> 541 | </Group> 542 | <Group type="103" groupAlignment="0" attributes="0"> 543 | <Group type="102" attributes="0"> 544 | <EmptySpace min="-2" pref="177" max="-2" attributes="0"/> 545 | <Component id="jLabel9" min="-2" max="-2" attributes="0"/> 546 | <EmptySpace max="32767" attributes="0"/> 547 | </Group> 548 | <Group type="102" alignment="1" attributes="0"> 549 | <EmptySpace max="32767" attributes="0"/> 550 | <Component id="totalCategorySrch_CB" min="-2" pref="221" max="-2" attributes="0"/> 551 | <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> 552 | </Group> 553 | </Group> 554 | </Group> 555 | </Group> 556 | </Group> 557 | </Group> 558 | </DimensionLayout> 559 | <DimensionLayout dim="1"> 560 | <Group type="103" groupAlignment="0" attributes="0"> 561 | <Group type="102" attributes="0"> 562 | <EmptySpace min="-2" pref="29" max="-2" attributes="0"/> 563 | <Group type="103" groupAlignment="0" attributes="0"> 564 | <Group type="102" attributes="0"> 565 | <Group type="103" groupAlignment="3" attributes="0"> 566 | <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/> 567 | <Component id="priceSrch_TF" alignment="3" min="-2" max="-2" attributes="0"/> 568 | </Group> 569 | <EmptySpace type="separate" max="-2" attributes="0"/> 570 | <Group type="103" groupAlignment="3" attributes="0"> 571 | <Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/> 572 | <Component id="categorySearch_CB" alignment="3" min="-2" max="-2" attributes="0"/> 573 | </Group> 574 | </Group> 575 | <Group type="102" attributes="0"> 576 | <EmptySpace min="1" pref="1" max="-2" attributes="0"/> 577 | <Component id="jLabel9" min="-2" max="-2" attributes="0"/> 578 | <EmptySpace max="-2" attributes="0"/> 579 | <Component id="totalCategorySrch_CB" min="-2" max="-2" attributes="0"/> 580 | </Group> 581 | </Group> 582 | <Group type="103" groupAlignment="0" attributes="0"> 583 | <Group type="102" attributes="0"> 584 | <EmptySpace max="32767" attributes="0"/> 585 | <Group type="103" groupAlignment="3" attributes="0"> 586 | <Component id="priceSrch_Btn" alignment="3" min="-2" max="-2" attributes="0"/> 587 | <Component id="totalDevice" alignment="3" min="-2" max="-2" attributes="0"/> 588 | </Group> 589 | <EmptySpace min="-2" pref="26" max="-2" attributes="0"/> 590 | </Group> 591 | <Group type="102" alignment="0" attributes="0"> 592 | <EmptySpace max="-2" attributes="0"/> 593 | <Component id="SortList_Btn" min="-2" max="-2" attributes="0"/> 594 | <EmptySpace max="32767" attributes="0"/> 595 | </Group> 596 | </Group> 597 | </Group> 598 | </Group> 599 | </DimensionLayout> 600 | </Layout> 601 | <SubComponents> 602 | <Component class="javax.swing.JTextField" name="priceSrch_TF"> 603 | <Events> 604 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="priceSrch_TFActionPerformed"/> 605 | <EventHandler event="keyTyped" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="priceSrch_TFKeyTyped"/> 606 | </Events> 607 | </Component> 608 | <Component class="javax.swing.JLabel" name="jLabel6"> 609 | <Properties> 610 | <Property name="text" type="java.lang.String" value="Device Price :"/> 611 | </Properties> 612 | </Component> 613 | <Component class="javax.swing.JButton" name="priceSrch_Btn"> 614 | <Properties> 615 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 616 | <Color blue="cc" green="66" red="0" type="rgb"/> 617 | </Property> 618 | <Property name="text" type="java.lang.String" value="Search device"/> 619 | </Properties> 620 | <Events> 621 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="priceSrch_BtnActionPerformed"/> 622 | </Events> 623 | </Component> 624 | <Component class="javax.swing.JLabel" name="jLabel7"> 625 | <Properties> 626 | <Property name="text" type="java.lang.String" value="Device category :"/> 627 | </Properties> 628 | </Component> 629 | <Component class="javax.swing.JComboBox" name="categorySearch_CB"> 630 | <Properties> 631 | <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> 632 | <StringArray count="6"> 633 | <StringItem index="0" value="(Optional)"/> 634 | <StringItem index="1" value="Gaming"/> 635 | <StringItem index="2" value="Home use"/> 636 | <StringItem index="3" value="Business"/> 637 | <StringItem index="4" value="High performance"/> 638 | <StringItem index="5" value="Customized"/> 639 | </StringArray> 640 | </Property> 641 | </Properties> 642 | <Events> 643 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="categorySearch_CBActionPerformed"/> 644 | </Events> 645 | <AuxValues> 646 | <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> 647 | </AuxValues> 648 | </Component> 649 | <Component class="javax.swing.JButton" name="SortList_Btn"> 650 | <Properties> 651 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 652 | <Color blue="cc" green="66" red="0" type="rgb"/> 653 | </Property> 654 | <Property name="text" type="java.lang.String" value="Sort List"/> 655 | </Properties> 656 | <Events> 657 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="SortList_BtnActionPerformed"/> 658 | </Events> 659 | </Component> 660 | <Component class="javax.swing.JComboBox" name="totalCategorySrch_CB"> 661 | <Properties> 662 | <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> 663 | <StringArray count="5"> 664 | <StringItem index="0" value="Gaming"/> 665 | <StringItem index="1" value="Home use"/> 666 | <StringItem index="2" value="Business"/> 667 | <StringItem index="3" value="High performance"/> 668 | <StringItem index="4" value="Customized"/> 669 | </StringArray> 670 | </Property> 671 | </Properties> 672 | <Events> 673 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="totalCategorySrch_CBActionPerformed"/> 674 | </Events> 675 | <AuxValues> 676 | <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> 677 | </AuxValues> 678 | </Component> 679 | <Component class="javax.swing.JLabel" name="jLabel9"> 680 | <Properties> 681 | <Property name="text" type="java.lang.String" value="Find total devices in a category"/> 682 | </Properties> 683 | </Component> 684 | <Component class="javax.swing.JButton" name="totalDevice"> 685 | <Properties> 686 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 687 | <Color blue="cc" green="66" red="0" type="rgb"/> 688 | </Property> 689 | <Property name="text" type="java.lang.String" value="Find"/> 690 | </Properties> 691 | <Events> 692 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="totalDeviceActionPerformed"/> 693 | </Events> 694 | </Component> 695 | </SubComponents> 696 | </Container> 697 | </SubComponents> 698 | </Form> 699 | -------------------------------------------------------------------------------- /build/classes/AppliancesInfo/TableRows.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/build/classes/AppliancesInfo/TableRows.class -------------------------------------------------------------------------------- /dist/Appliances_IS.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/dist/Appliances_IS.jar -------------------------------------------------------------------------------- /dist/README.TXT: -------------------------------------------------------------------------------- 1 | ======================== 2 | BUILD OUTPUT DESCRIPTION 3 | ======================== 4 | 5 | When you build an Java application project that has a main class, the IDE 6 | automatically copies all of the JAR 7 | files on the projects classpath to your projects dist/lib folder. The IDE 8 | also adds each of the JAR files to the Class-Path element in the application 9 | JAR files manifest file (MANIFEST.MF). 10 | 11 | To run the project from the command line, go to the dist folder and 12 | type the following: 13 | 14 | java -jar "Appliances_IS.jar" 15 | 16 | To distribute this project, zip up the dist folder (including the lib folder) 17 | and distribute the ZIP file. 18 | 19 | Notes: 20 | 21 | * If two JAR files on the project classpath have the same name, only the first 22 | JAR file is copied to the lib folder. 23 | * Only JAR files are copied to the lib folder. 24 | If the classpath contains other types of files or folders, these files (folders) 25 | are not copied. 26 | * If a library on the projects classpath also has a Class-Path element 27 | specified in the manifest,the content of the Class-Path element has to be on 28 | the projects runtime path. 29 | * To set a main class in a standard Java project, right-click the project node 30 | in the Projects window and choose Properties. Then click Run and enter the 31 | class name in the Main Class field. Alternatively, you can manually type the 32 | class name in the manifest Main-Class element. 33 | -------------------------------------------------------------------------------- /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=ad3202fd 2 | build.xml.script.CRC32=ccf64a5b 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=ad3202fd 7 | nbproject/build-impl.xml.script.CRC32=c5a7343e 8 | nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 9 | -------------------------------------------------------------------------------- /nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | compile.on.save=true 2 | user.properties.file=C:\\Users\\Aadesh\\AppData\\Roaming\\NetBeans\\8.2rc\\build.properties 3 | -------------------------------------------------------------------------------- /nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <project-private xmlns="http://www.netbeans.org/ns/project-private/1"> 3 | <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> 4 | <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2"> 5 | <group> 6 | <file>file:/C:/Users/Aadesh/Desktop/Classes/Emerging/Java/Appliances_IS/src/AppliancesInfo/TableRows.java</file> 7 | <file>file:/C:/Users/Aadesh/Desktop/Classes/Emerging/Java/Appliances_IS/src/AppliancesInfo/AppliancesInfo.java</file> 8 | </group> 9 | </open-files> 10 | </project-private> 11 | -------------------------------------------------------------------------------- /nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.processor.options= 4 | annotation.processing.processors.list= 5 | annotation.processing.run.all.processors=true 6 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 7 | build.classes.dir=${build.dir}/classes 8 | build.classes.excludes=**/*.java,**/*.form 9 | # This directory is removed when the project is cleaned: 10 | build.dir=build 11 | build.generated.dir=${build.dir}/generated 12 | build.generated.sources.dir=${build.dir}/generated-sources 13 | # Only compile against the classpath explicitly listed here: 14 | build.sysclasspath=ignore 15 | build.test.classes.dir=${build.dir}/test/classes 16 | build.test.results.dir=${build.dir}/test/results 17 | # Uncomment to specify the preferred debugger connection transport: 18 | #debug.transport=dt_socket 19 | debug.classpath=\ 20 | ${run.classpath} 21 | debug.test.classpath=\ 22 | ${run.test.classpath} 23 | # Files in build.classes.dir which should be excluded from distribution jar 24 | dist.archive.excludes= 25 | # This directory is removed when the project is cleaned: 26 | dist.dir=dist 27 | dist.jar=${dist.dir}/Appliances_IS.jar 28 | dist.javadoc.dir=${dist.dir}/javadoc 29 | excludes= 30 | includes=** 31 | jar.compress=false 32 | javac.classpath= 33 | # Space-separated list of extra javac options 34 | javac.compilerargs= 35 | javac.deprecation=false 36 | javac.external.vm=true 37 | javac.processorpath=\ 38 | ${javac.classpath} 39 | javac.source=1.8 40 | javac.target=1.8 41 | javac.test.classpath=\ 42 | ${javac.classpath}:\ 43 | ${build.classes.dir} 44 | javac.test.processorpath=\ 45 | ${javac.test.classpath} 46 | javadoc.additionalparam= 47 | javadoc.author=false 48 | javadoc.encoding=${source.encoding} 49 | javadoc.noindex=false 50 | javadoc.nonavbar=false 51 | javadoc.notree=false 52 | javadoc.private=false 53 | javadoc.splitindex=true 54 | javadoc.use=true 55 | javadoc.version=false 56 | javadoc.windowtitle= 57 | main.class=AppliancesInfo.AppliancesInfo 58 | manifest.file=manifest.mf 59 | meta.inf.dir=${src.dir}/META-INF 60 | mkdist.disabled=false 61 | platform.active=default_platform 62 | run.classpath=\ 63 | ${javac.classpath}:\ 64 | ${build.classes.dir} 65 | # Space-separated list of JVM arguments used when running the project. 66 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. 67 | # To set system properties for unit tests define test-sys-prop.name=value: 68 | run.jvmargs= 69 | run.test.classpath=\ 70 | ${javac.test.classpath}:\ 71 | ${build.test.classes.dir} 72 | source.encoding=UTF-8 73 | src.dir=src 74 | test.src.dir=test 75 | -------------------------------------------------------------------------------- /nbproject/project.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <project xmlns="http://www.netbeans.org/ns/project/1"> 3 | <type>org.netbeans.modules.java.j2seproject</type> 4 | <configuration> 5 | <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> 6 | <name>Appliances_IS</name> 7 | <source-roots> 8 | <root id="src.dir"/> 9 | </source-roots> 10 | <test-roots> 11 | <root id="test.src.dir"/> 12 | </test-roots> 13 | </data> 14 | </configuration> 15 | </project> 16 | -------------------------------------------------------------------------------- /rights_reserved.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/rights_reserved.pdf -------------------------------------------------------------------------------- /src/AppliancesInfo/AppliancesInfo.form: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" ?> 2 | 3 | <Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> 4 | <NonVisualComponents> 5 | <Component class="javax.swing.ButtonGroup" name="range_BtnGrp"> 6 | </Component> 7 | <Component class="javax.swing.JComboBox" name="jComboBox1"> 8 | <Properties> 9 | <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> 10 | <StringArray count="4"> 11 | <StringItem index="0" value="Item 1"/> 12 | <StringItem index="1" value="Item 2"/> 13 | <StringItem index="2" value="Item 3"/> 14 | <StringItem index="3" value="Item 4"/> 15 | </StringArray> 16 | </Property> 17 | </Properties> 18 | <AuxValues> 19 | <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> 20 | </AuxValues> 21 | </Component> 22 | <Menu class="javax.swing.JMenuBar" name="jMenuBar1"> 23 | <SubComponents> 24 | <Menu class="javax.swing.JMenu" name="jMenu1"> 25 | <Properties> 26 | <Property name="text" type="java.lang.String" value="File"/> 27 | </Properties> 28 | <SubComponents> 29 | <MenuItem class="javax.swing.JRadioButtonMenuItem" name="openFile"> 30 | <Properties> 31 | <Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor"> 32 | <KeyStroke key="Ctrl+O"/> 33 | </Property> 34 | <Property name="selected" type="boolean" value="true"/> 35 | <Property name="text" type="java.lang.String" value="Open"/> 36 | </Properties> 37 | <Events> 38 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="openFileActionPerformed"/> 39 | </Events> 40 | </MenuItem> 41 | <MenuItem class="javax.swing.JMenuItem" name="importDB_MenuItem"> 42 | <Properties> 43 | <Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor"> 44 | <KeyStroke key="Ctrl+I"/> 45 | </Property> 46 | <Property name="text" type="java.lang.String" value="Import Database file"/> 47 | </Properties> 48 | <Events> 49 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="importDB_MenuItemActionPerformed"/> 50 | </Events> 51 | </MenuItem> 52 | <MenuItem class="javax.swing.JMenuItem" name="close_menuItem"> 53 | <Properties> 54 | <Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor"> 55 | <KeyStroke key="Ctrl+BACK_SPACE"/> 56 | </Property> 57 | <Property name="text" type="java.lang.String" value="Close"/> 58 | </Properties> 59 | <Events> 60 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="close_menuItemActionPerformed"/> 61 | </Events> 62 | </MenuItem> 63 | </SubComponents> 64 | </Menu> 65 | <Menu class="javax.swing.JMenu" name="jMenu2"> 66 | <Properties> 67 | <Property name="text" type="java.lang.String" value="Help"/> 68 | </Properties> 69 | <SubComponents> 70 | <MenuItem class="javax.swing.JRadioButtonMenuItem" name="UserManual"> 71 | <Properties> 72 | <Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor"> 73 | <KeyStroke key="Ctrl+M"/> 74 | </Property> 75 | <Property name="selected" type="boolean" value="true"/> 76 | <Property name="text" type="java.lang.String" value="Open Manual"/> 77 | </Properties> 78 | <Events> 79 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="UserManualActionPerformed"/> 80 | </Events> 81 | </MenuItem> 82 | </SubComponents> 83 | </Menu> 84 | </SubComponents> 85 | </Menu> 86 | </NonVisualComponents> 87 | <Properties> 88 | <Property name="defaultCloseOperation" type="int" value="3"/> 89 | <Property name="title" type="java.lang.String" value="Malla Computers"/> 90 | </Properties> 91 | <SyntheticProperties> 92 | <SyntheticProperty name="menuBar" type="java.lang.String" value="jMenuBar1"/> 93 | <SyntheticProperty name="formSizePolicy" type="int" value="1"/> 94 | <SyntheticProperty name="generateCenter" type="boolean" value="false"/> 95 | </SyntheticProperties> 96 | <AuxValues> 97 | <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> 98 | <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> 99 | <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> 100 | <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> 101 | <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> 102 | <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> 103 | <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> 104 | <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> 105 | <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> 106 | </AuxValues> 107 | 108 | <Layout> 109 | <DimensionLayout dim="0"> 110 | <Group type="103" groupAlignment="0" attributes="0"> 111 | <Group type="102" alignment="0" attributes="0"> 112 | <EmptySpace max="-2" attributes="0"/> 113 | <Group type="103" groupAlignment="0" attributes="0"> 114 | <Component id="jPanel1" max="32767" attributes="0"/> 115 | <Component id="jPanel2" max="32767" attributes="0"/> 116 | </Group> 117 | <EmptySpace max="-2" attributes="0"/> 118 | <Component id="table_Panel" min="-2" max="-2" attributes="0"/> 119 | <EmptySpace max="-2" attributes="0"/> 120 | </Group> 121 | </Group> 122 | </DimensionLayout> 123 | <DimensionLayout dim="1"> 124 | <Group type="103" groupAlignment="0" attributes="0"> 125 | <Group type="102" alignment="1" attributes="0"> 126 | <EmptySpace max="32767" attributes="0"/> 127 | <Group type="103" groupAlignment="1" attributes="0"> 128 | <Component id="table_Panel" min="-2" max="-2" attributes="0"/> 129 | <Group type="102" attributes="0"> 130 | <Component id="jPanel1" min="-2" max="-2" attributes="0"/> 131 | <EmptySpace max="-2" attributes="0"/> 132 | <Component id="jPanel2" min="-2" max="-2" attributes="0"/> 133 | </Group> 134 | </Group> 135 | <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> 136 | </Group> 137 | </Group> 138 | </DimensionLayout> 139 | </Layout> 140 | <SubComponents> 141 | <Container class="javax.swing.JPanel" name="table_Panel"> 142 | <Properties> 143 | <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> 144 | <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> 145 | <TitledBorder title="Form"> 146 | <Border PropertyName="innerBorder" info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> 147 | <BevelBorder/> 148 | </Border> 149 | </TitledBorder> 150 | </Border> 151 | </Property> 152 | </Properties> 153 | 154 | <Layout> 155 | <DimensionLayout dim="0"> 156 | <Group type="103" groupAlignment="0" attributes="0"> 157 | <Group type="102" alignment="1" attributes="0"> 158 | <EmptySpace pref="18" max="32767" attributes="0"/> 159 | <Group type="103" groupAlignment="1" attributes="0"> 160 | <Group type="102" attributes="0"> 161 | <Group type="103" groupAlignment="0" attributes="0"> 162 | <Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/> 163 | <Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/> 164 | <Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/> 165 | <Component id="jLabel4" alignment="0" min="-2" max="-2" attributes="0"/> 166 | <Component id="jLabel8" alignment="0" min="-2" max="-2" attributes="0"/> 167 | <Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/> 168 | </Group> 169 | <EmptySpace min="-2" pref="67" max="-2" attributes="0"/> 170 | <Group type="103" groupAlignment="0" attributes="0"> 171 | <Component id="price_TF" min="-2" pref="236" max="-2" attributes="0"/> 172 | <Component id="type_CB" min="-2" max="-2" attributes="0"/> 173 | <Group type="103" alignment="0" groupAlignment="0" max="-2" attributes="0"> 174 | <Group type="102" alignment="0" attributes="0"> 175 | <Component id="Budget_rangeBTN" min="-2" max="-2" attributes="0"/> 176 | <EmptySpace max="32767" attributes="0"/> 177 | <Component id="High_rangeBtn" min="-2" max="-2" attributes="0"/> 178 | </Group> 179 | <Component id="id_TF" max="32767" attributes="0"/> 180 | <Component id="name_TF" min="-2" pref="236" max="-2" attributes="0"/> 181 | </Group> 182 | <Group type="103" alignment="0" groupAlignment="1" attributes="0"> 183 | <Component id="Mid_RangeBtn" min="-2" max="-2" attributes="0"/> 184 | <Component id="category_CB" min="-2" pref="152" max="-2" attributes="0"/> 185 | </Group> 186 | </Group> 187 | </Group> 188 | <Group type="102" attributes="0"> 189 | <Component id="add_Btn" min="-2" max="-2" attributes="0"/> 190 | <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> 191 | <Component id="clear_Btn" min="-2" max="-2" attributes="0"/> 192 | <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> 193 | <Component id="delete_Btn" min="-2" max="-2" attributes="0"/> 194 | <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> 195 | <Component id="exit_Btn" min="-2" max="-2" attributes="0"/> 196 | </Group> 197 | </Group> 198 | <EmptySpace min="-2" pref="58" max="-2" attributes="0"/> 199 | </Group> 200 | </Group> 201 | </DimensionLayout> 202 | <DimensionLayout dim="1"> 203 | <Group type="103" groupAlignment="0" attributes="0"> 204 | <Group type="102" alignment="0" attributes="0"> 205 | <EmptySpace max="-2" attributes="0"/> 206 | <Group type="103" groupAlignment="3" attributes="0"> 207 | <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/> 208 | <Component id="id_TF" alignment="3" min="-2" max="-2" attributes="0"/> 209 | </Group> 210 | <EmptySpace min="-2" pref="45" max="-2" attributes="0"/> 211 | <Group type="103" groupAlignment="3" attributes="0"> 212 | <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> 213 | <Component id="name_TF" alignment="3" min="-2" max="-2" attributes="0"/> 214 | </Group> 215 | <EmptySpace min="-2" pref="45" max="-2" attributes="0"/> 216 | <Group type="103" groupAlignment="0" attributes="0"> 217 | <Component id="jLabel3" min="-2" max="-2" attributes="0"/> 218 | <Component id="category_CB" min="-2" max="-2" attributes="0"/> 219 | </Group> 220 | <EmptySpace min="-2" pref="44" max="-2" attributes="0"/> 221 | <Group type="103" groupAlignment="3" attributes="0"> 222 | <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> 223 | <Component id="Mid_RangeBtn" alignment="3" min="-2" max="-2" attributes="0"/> 224 | <Component id="High_rangeBtn" alignment="3" min="-2" max="-2" attributes="0"/> 225 | <Component id="Budget_rangeBTN" alignment="3" min="-2" max="-2" attributes="0"/> 226 | </Group> 227 | <EmptySpace min="-2" pref="45" max="-2" attributes="0"/> 228 | <Group type="103" groupAlignment="3" attributes="0"> 229 | <Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/> 230 | <Component id="type_CB" alignment="3" min="-2" max="-2" attributes="0"/> 231 | </Group> 232 | <EmptySpace pref="28" max="32767" attributes="0"/> 233 | <Group type="103" groupAlignment="3" attributes="0"> 234 | <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/> 235 | <Component id="price_TF" alignment="3" min="-2" max="-2" attributes="0"/> 236 | </Group> 237 | <EmptySpace min="-2" pref="26" max="-2" attributes="0"/> 238 | <Group type="103" groupAlignment="3" attributes="0"> 239 | <Component id="add_Btn" alignment="3" min="-2" max="-2" attributes="0"/> 240 | <Component id="clear_Btn" alignment="3" min="-2" max="-2" attributes="0"/> 241 | <Component id="delete_Btn" alignment="3" min="-2" max="-2" attributes="0"/> 242 | <Component id="exit_Btn" alignment="3" min="-2" max="-2" attributes="0"/> 243 | </Group> 244 | <EmptySpace max="-2" attributes="0"/> 245 | </Group> 246 | </Group> 247 | </DimensionLayout> 248 | </Layout> 249 | <SubComponents> 250 | <Component class="javax.swing.JLabel" name="jLabel1"> 251 | <Properties> 252 | <Property name="text" type="java.lang.String" value="Device ID :"/> 253 | </Properties> 254 | </Component> 255 | <Component class="javax.swing.JLabel" name="jLabel2"> 256 | <Properties> 257 | <Property name="text" type="java.lang.String" value="Device name :"/> 258 | </Properties> 259 | </Component> 260 | <Component class="javax.swing.JLabel" name="jLabel3"> 261 | <Properties> 262 | <Property name="text" type="java.lang.String" value="Category :"/> 263 | </Properties> 264 | </Component> 265 | <Component class="javax.swing.JLabel" name="jLabel4"> 266 | <Properties> 267 | <Property name="text" type="java.lang.String" value="Range level :"/> 268 | </Properties> 269 | </Component> 270 | <Component class="javax.swing.JLabel" name="jLabel5"> 271 | <Properties> 272 | <Property name="text" type="java.lang.String" value="Price :"/> 273 | </Properties> 274 | </Component> 275 | <Component class="javax.swing.JButton" name="add_Btn"> 276 | <Properties> 277 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 278 | <Color blue="cc" green="66" red="0" type="rgb"/> 279 | </Property> 280 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 281 | <Color blue="0" green="0" red="0" type="rgb"/> 282 | </Property> 283 | <Property name="text" type="java.lang.String" value="Add Item"/> 284 | </Properties> 285 | <Events> 286 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="add_BtnActionPerformed"/> 287 | </Events> 288 | </Component> 289 | <Component class="javax.swing.JButton" name="clear_Btn"> 290 | <Properties> 291 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 292 | <Color blue="cc" green="66" red="0" type="rgb"/> 293 | </Property> 294 | <Property name="text" type="java.lang.String" value="Clear"/> 295 | </Properties> 296 | <Events> 297 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clear_BtnActionPerformed"/> 298 | </Events> 299 | </Component> 300 | <Component class="javax.swing.JButton" name="delete_Btn"> 301 | <Properties> 302 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 303 | <Color blue="cc" green="66" red="0" type="rgb"/> 304 | </Property> 305 | <Property name="text" type="java.lang.String" value="Delete"/> 306 | </Properties> 307 | <Events> 308 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="delete_BtnActionPerformed"/> 309 | </Events> 310 | </Component> 311 | <Component class="javax.swing.JTextField" name="id_TF"> 312 | <Events> 313 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="id_TFActionPerformed"/> 314 | <EventHandler event="keyTyped" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="id_TFKeyTyped"/> 315 | </Events> 316 | </Component> 317 | <Component class="javax.swing.JTextField" name="name_TF"> 318 | </Component> 319 | <Component class="javax.swing.JTextField" name="price_TF"> 320 | <Events> 321 | <EventHandler event="keyTyped" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="price_TFKeyTyped"/> 322 | </Events> 323 | </Component> 324 | <Component class="javax.swing.JRadioButton" name="Mid_RangeBtn"> 325 | <Properties> 326 | <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> 327 | <ComponentRef name="range_BtnGrp"/> 328 | </Property> 329 | <Property name="text" type="java.lang.String" value="Mid"/> 330 | </Properties> 331 | <Events> 332 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="Mid_RangeBtnActionPerformed"/> 333 | </Events> 334 | </Component> 335 | <Component class="javax.swing.JRadioButton" name="High_rangeBtn"> 336 | <Properties> 337 | <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> 338 | <ComponentRef name="range_BtnGrp"/> 339 | </Property> 340 | <Property name="text" type="java.lang.String" value="High"/> 341 | </Properties> 342 | <Events> 343 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="High_rangeBtnActionPerformed"/> 344 | </Events> 345 | </Component> 346 | <Component class="javax.swing.JRadioButton" name="Budget_rangeBTN"> 347 | <Properties> 348 | <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> 349 | <ComponentRef name="range_BtnGrp"/> 350 | </Property> 351 | <Property name="text" type="java.lang.String" value="Budget"/> 352 | </Properties> 353 | <Events> 354 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="Budget_rangeBTNActionPerformed"/> 355 | </Events> 356 | </Component> 357 | <Component class="javax.swing.JComboBox" name="category_CB"> 358 | <Properties> 359 | <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> 360 | <StringArray count="5"> 361 | <StringItem index="0" value="Gaming"/> 362 | <StringItem index="1" value="Home use"/> 363 | <StringItem index="2" value="Business"/> 364 | <StringItem index="3" value="High performance"/> 365 | <StringItem index="4" value="Customized"/> 366 | </StringArray> 367 | </Property> 368 | </Properties> 369 | <Events> 370 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="category_CBActionPerformed"/> 371 | </Events> 372 | <AuxValues> 373 | <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> 374 | </AuxValues> 375 | </Component> 376 | <Component class="javax.swing.JButton" name="exit_Btn"> 377 | <Properties> 378 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 379 | <Color blue="cc" green="66" red="0" type="rgb"/> 380 | </Property> 381 | <Property name="text" type="java.lang.String" value="Exit"/> 382 | </Properties> 383 | <Events> 384 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="exit_BtnActionPerformed"/> 385 | </Events> 386 | </Component> 387 | <Component class="javax.swing.JLabel" name="jLabel8"> 388 | <Properties> 389 | <Property name="text" type="java.lang.String" value="Type :"/> 390 | </Properties> 391 | </Component> 392 | <Component class="javax.swing.JComboBox" name="type_CB"> 393 | <Properties> 394 | <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> 395 | <StringArray count="3"> 396 | <StringItem index="0" value="Desktop"/> 397 | <StringItem index="1" value="Laptop"/> 398 | <StringItem index="2" value="Convertible"/> 399 | </StringArray> 400 | </Property> 401 | </Properties> 402 | <AuxValues> 403 | <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> 404 | </AuxValues> 405 | </Component> 406 | </SubComponents> 407 | </Container> 408 | <Container class="javax.swing.JPanel" name="jPanel1"> 409 | <Properties> 410 | <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> 411 | <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> 412 | <TitledBorder title="Personal Computer Information System"> 413 | <Border PropertyName="innerBorder" info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> 414 | <BevelBorder/> 415 | </Border> 416 | <Font PropertyName="font" name="Bahnschrift" size="16" style="1"/> 417 | </TitledBorder> 418 | </Border> 419 | </Property> 420 | </Properties> 421 | 422 | <Layout> 423 | <DimensionLayout dim="0"> 424 | <Group type="103" groupAlignment="0" attributes="0"> 425 | <Group type="102" alignment="0" attributes="0"> 426 | <EmptySpace max="-2" attributes="0"/> 427 | <Component id="jScrollPane1" pref="727" max="32767" attributes="0"/> 428 | <EmptySpace max="-2" attributes="0"/> 429 | </Group> 430 | </Group> 431 | </DimensionLayout> 432 | <DimensionLayout dim="1"> 433 | <Group type="103" groupAlignment="0" attributes="0"> 434 | <Group type="102" alignment="0" attributes="0"> 435 | <EmptySpace max="-2" attributes="0"/> 436 | <Component id="jScrollPane1" min="-2" pref="222" max="-2" attributes="0"/> 437 | <EmptySpace pref="15" max="32767" attributes="0"/> 438 | </Group> 439 | </Group> 440 | </DimensionLayout> 441 | </Layout> 442 | <SubComponents> 443 | <Container class="javax.swing.JScrollPane" name="jScrollPane1"> 444 | <AuxValues> 445 | <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> 446 | </AuxValues> 447 | 448 | <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> 449 | <SubComponents> 450 | <Component class="javax.swing.JTable" name="computerIS_Tbl"> 451 | <Properties> 452 | <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> 453 | <Table columnCount="6" rowCount="26"> 454 | <Column editable="false" title="ID" type="java.lang.Object"/> 455 | <Column editable="false" title="Name" type="java.lang.Object"/> 456 | <Column editable="false" title="Category" type="java.lang.Object"/> 457 | <Column editable="false" title="Range level" type="java.lang.Object"/> 458 | <Column editable="false" title="Type" type="java.lang.Object"/> 459 | <Column editable="false" title="Price" type="java.lang.Object"/> 460 | </Table> 461 | </Property> 462 | <Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor"> 463 | <TableColumnModel selectionModel="0"> 464 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 465 | <Title/> 466 | <Editor/> 467 | <Renderer/> 468 | </Column> 469 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 470 | <Title/> 471 | <Editor/> 472 | <Renderer/> 473 | </Column> 474 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 475 | <Title/> 476 | <Editor/> 477 | <Renderer/> 478 | </Column> 479 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 480 | <Title/> 481 | <Editor/> 482 | <Renderer/> 483 | </Column> 484 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 485 | <Title/> 486 | <Editor/> 487 | <Renderer/> 488 | </Column> 489 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 490 | <Title/> 491 | <Editor/> 492 | <Renderer/> 493 | </Column> 494 | </TableColumnModel> 495 | </Property> 496 | <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> 497 | <TableHeader reorderingAllowed="true" resizingAllowed="true"/> 498 | </Property> 499 | </Properties> 500 | </Component> 501 | </SubComponents> 502 | </Container> 503 | </SubComponents> 504 | </Container> 505 | <Container class="javax.swing.JPanel" name="jPanel2"> 506 | <Properties> 507 | <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> 508 | <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> 509 | <TitledBorder title="Search"> 510 | <Border PropertyName="innerBorder" info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> 511 | <BevelBorder/> 512 | </Border> 513 | </TitledBorder> 514 | </Border> 515 | </Property> 516 | </Properties> 517 | 518 | <Layout> 519 | <DimensionLayout dim="0"> 520 | <Group type="103" groupAlignment="0" attributes="0"> 521 | <Group type="102" alignment="0" attributes="0"> 522 | <EmptySpace max="-2" attributes="0"/> 523 | <Group type="103" groupAlignment="0" attributes="0"> 524 | <Group type="102" alignment="0" attributes="0"> 525 | <Component id="priceSrch_Btn" min="-2" pref="213" max="-2" attributes="0"/> 526 | <EmptySpace min="-2" pref="32" max="-2" attributes="0"/> 527 | <Component id="SortList_Btn" min="-2" pref="127" max="-2" attributes="0"/> 528 | <EmptySpace max="32767" attributes="0"/> 529 | <Component id="totalDevice" min="-2" pref="127" max="-2" attributes="0"/> 530 | <EmptySpace min="-2" pref="83" max="-2" attributes="0"/> 531 | </Group> 532 | <Group type="102" alignment="0" attributes="0"> 533 | <Group type="103" groupAlignment="0" attributes="0"> 534 | <Component id="jLabel6" alignment="0" min="-2" max="-2" attributes="0"/> 535 | <Component id="jLabel7" alignment="0" min="-2" max="-2" attributes="0"/> 536 | </Group> 537 | <EmptySpace min="-2" pref="47" max="-2" attributes="0"/> 538 | <Group type="103" groupAlignment="0" max="-2" attributes="0"> 539 | <Component id="categorySearch_CB" pref="177" max="32767" attributes="0"/> 540 | <Component id="priceSrch_TF" max="32767" attributes="0"/> 541 | </Group> 542 | <Group type="103" groupAlignment="0" attributes="0"> 543 | <Group type="102" attributes="0"> 544 | <EmptySpace min="-2" pref="177" max="-2" attributes="0"/> 545 | <Component id="jLabel9" min="-2" max="-2" attributes="0"/> 546 | <EmptySpace max="32767" attributes="0"/> 547 | </Group> 548 | <Group type="102" alignment="1" attributes="0"> 549 | <EmptySpace max="32767" attributes="0"/> 550 | <Component id="totalCategorySrch_CB" min="-2" pref="221" max="-2" attributes="0"/> 551 | <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> 552 | </Group> 553 | </Group> 554 | </Group> 555 | </Group> 556 | </Group> 557 | </Group> 558 | </DimensionLayout> 559 | <DimensionLayout dim="1"> 560 | <Group type="103" groupAlignment="0" attributes="0"> 561 | <Group type="102" attributes="0"> 562 | <EmptySpace min="-2" pref="29" max="-2" attributes="0"/> 563 | <Group type="103" groupAlignment="0" attributes="0"> 564 | <Group type="102" attributes="0"> 565 | <Group type="103" groupAlignment="3" attributes="0"> 566 | <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/> 567 | <Component id="priceSrch_TF" alignment="3" min="-2" max="-2" attributes="0"/> 568 | </Group> 569 | <EmptySpace type="separate" max="-2" attributes="0"/> 570 | <Group type="103" groupAlignment="3" attributes="0"> 571 | <Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/> 572 | <Component id="categorySearch_CB" alignment="3" min="-2" max="-2" attributes="0"/> 573 | </Group> 574 | </Group> 575 | <Group type="102" attributes="0"> 576 | <EmptySpace min="1" pref="1" max="-2" attributes="0"/> 577 | <Component id="jLabel9" min="-2" max="-2" attributes="0"/> 578 | <EmptySpace max="-2" attributes="0"/> 579 | <Component id="totalCategorySrch_CB" min="-2" max="-2" attributes="0"/> 580 | </Group> 581 | </Group> 582 | <Group type="103" groupAlignment="0" attributes="0"> 583 | <Group type="102" attributes="0"> 584 | <EmptySpace max="32767" attributes="0"/> 585 | <Group type="103" groupAlignment="3" attributes="0"> 586 | <Component id="priceSrch_Btn" alignment="3" min="-2" max="-2" attributes="0"/> 587 | <Component id="totalDevice" alignment="3" min="-2" max="-2" attributes="0"/> 588 | </Group> 589 | <EmptySpace min="-2" pref="26" max="-2" attributes="0"/> 590 | </Group> 591 | <Group type="102" alignment="0" attributes="0"> 592 | <EmptySpace max="-2" attributes="0"/> 593 | <Component id="SortList_Btn" min="-2" max="-2" attributes="0"/> 594 | <EmptySpace max="32767" attributes="0"/> 595 | </Group> 596 | </Group> 597 | </Group> 598 | </Group> 599 | </DimensionLayout> 600 | </Layout> 601 | <SubComponents> 602 | <Component class="javax.swing.JTextField" name="priceSrch_TF"> 603 | <Events> 604 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="priceSrch_TFActionPerformed"/> 605 | <EventHandler event="keyTyped" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="priceSrch_TFKeyTyped"/> 606 | </Events> 607 | </Component> 608 | <Component class="javax.swing.JLabel" name="jLabel6"> 609 | <Properties> 610 | <Property name="text" type="java.lang.String" value="Device Price :"/> 611 | </Properties> 612 | </Component> 613 | <Component class="javax.swing.JButton" name="priceSrch_Btn"> 614 | <Properties> 615 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 616 | <Color blue="cc" green="66" red="0" type="rgb"/> 617 | </Property> 618 | <Property name="text" type="java.lang.String" value="Search device"/> 619 | </Properties> 620 | <Events> 621 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="priceSrch_BtnActionPerformed"/> 622 | </Events> 623 | </Component> 624 | <Component class="javax.swing.JLabel" name="jLabel7"> 625 | <Properties> 626 | <Property name="text" type="java.lang.String" value="Device category :"/> 627 | </Properties> 628 | </Component> 629 | <Component class="javax.swing.JComboBox" name="categorySearch_CB"> 630 | <Properties> 631 | <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> 632 | <StringArray count="6"> 633 | <StringItem index="0" value="(Optional)"/> 634 | <StringItem index="1" value="Gaming"/> 635 | <StringItem index="2" value="Home use"/> 636 | <StringItem index="3" value="Business"/> 637 | <StringItem index="4" value="High performance"/> 638 | <StringItem index="5" value="Customized"/> 639 | </StringArray> 640 | </Property> 641 | </Properties> 642 | <Events> 643 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="categorySearch_CBActionPerformed"/> 644 | </Events> 645 | <AuxValues> 646 | <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> 647 | </AuxValues> 648 | </Component> 649 | <Component class="javax.swing.JButton" name="SortList_Btn"> 650 | <Properties> 651 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 652 | <Color blue="cc" green="66" red="0" type="rgb"/> 653 | </Property> 654 | <Property name="text" type="java.lang.String" value="Sort List"/> 655 | </Properties> 656 | <Events> 657 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="SortList_BtnActionPerformed"/> 658 | </Events> 659 | </Component> 660 | <Component class="javax.swing.JComboBox" name="totalCategorySrch_CB"> 661 | <Properties> 662 | <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> 663 | <StringArray count="5"> 664 | <StringItem index="0" value="Gaming"/> 665 | <StringItem index="1" value="Home use"/> 666 | <StringItem index="2" value="Business"/> 667 | <StringItem index="3" value="High performance"/> 668 | <StringItem index="4" value="Customized"/> 669 | </StringArray> 670 | </Property> 671 | </Properties> 672 | <Events> 673 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="totalCategorySrch_CBActionPerformed"/> 674 | </Events> 675 | <AuxValues> 676 | <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> 677 | </AuxValues> 678 | </Component> 679 | <Component class="javax.swing.JLabel" name="jLabel9"> 680 | <Properties> 681 | <Property name="text" type="java.lang.String" value="Find total devices in a category"/> 682 | </Properties> 683 | </Component> 684 | <Component class="javax.swing.JButton" name="totalDevice"> 685 | <Properties> 686 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 687 | <Color blue="cc" green="66" red="0" type="rgb"/> 688 | </Property> 689 | <Property name="text" type="java.lang.String" value="Find"/> 690 | </Properties> 691 | <Events> 692 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="totalDeviceActionPerformed"/> 693 | </Events> 694 | </Component> 695 | </SubComponents> 696 | </Container> 697 | </SubComponents> 698 | </Form> 699 | -------------------------------------------------------------------------------- /src/AppliancesInfo/AppliancesInfo.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 | package AppliancesInfo; 7 | 8 | import java.io.BufferedReader; 9 | import java.io.File; 10 | import java.io.FileNotFoundException; 11 | import java.io.FileReader; 12 | import java.io.FileWriter; 13 | import java.io.IOException; 14 | import java.util.ArrayList; 15 | import java.util.Collections; 16 | import java.util.regex.Pattern; 17 | import javax.swing.JOptionPane; 18 | import javax.swing.JTable; 19 | import javax.swing.table.DefaultTableModel; 20 | import javax.swing.table.TableModel; 21 | 22 | /** 23 | * 24 | * @author Aadesh 25 | */ 26 | public class AppliancesInfo extends javax.swing.JFrame { 27 | 28 | private String range; 29 | 30 | /** 31 | * Creates new form AppliancesInfo 32 | */ 33 | public ArrayList<TableRows> list = new ArrayList(); 34 | public AppliancesInfo() { 35 | initComponents(); 36 | } 37 | 38 | /** 39 | * This method is called from within the constructor to initialize the form. 40 | * WARNING: Do NOT modify this code. The content of this method is always 41 | * regenerated by the Form Editor. 42 | */ 43 | @SuppressWarnings("unchecked") 44 | // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 45 | private void initComponents() { 46 | 47 | range_BtnGrp = new javax.swing.ButtonGroup(); 48 | jComboBox1 = new javax.swing.JComboBox<>(); 49 | table_Panel = new javax.swing.JPanel(); 50 | jLabel1 = new javax.swing.JLabel(); 51 | jLabel2 = new javax.swing.JLabel(); 52 | jLabel3 = new javax.swing.JLabel(); 53 | jLabel4 = new javax.swing.JLabel(); 54 | jLabel5 = new javax.swing.JLabel(); 55 | add_Btn = new javax.swing.JButton(); 56 | clear_Btn = new javax.swing.JButton(); 57 | delete_Btn = new javax.swing.JButton(); 58 | id_TF = new javax.swing.JTextField(); 59 | name_TF = new javax.swing.JTextField(); 60 | price_TF = new javax.swing.JTextField(); 61 | Mid_RangeBtn = new javax.swing.JRadioButton(); 62 | High_rangeBtn = new javax.swing.JRadioButton(); 63 | Budget_rangeBTN = new javax.swing.JRadioButton(); 64 | category_CB = new javax.swing.JComboBox<>(); 65 | exit_Btn = new javax.swing.JButton(); 66 | jLabel8 = new javax.swing.JLabel(); 67 | type_CB = new javax.swing.JComboBox<>(); 68 | jPanel1 = new javax.swing.JPanel(); 69 | jScrollPane1 = new javax.swing.JScrollPane(); 70 | computerIS_Tbl = new javax.swing.JTable(); 71 | jPanel2 = new javax.swing.JPanel(); 72 | priceSrch_TF = new javax.swing.JTextField(); 73 | jLabel6 = new javax.swing.JLabel(); 74 | priceSrch_Btn = new javax.swing.JButton(); 75 | jLabel7 = new javax.swing.JLabel(); 76 | categorySearch_CB = new javax.swing.JComboBox<>(); 77 | SortList_Btn = new javax.swing.JButton(); 78 | totalCategorySrch_CB = new javax.swing.JComboBox<>(); 79 | jLabel9 = new javax.swing.JLabel(); 80 | totalDevice = new javax.swing.JButton(); 81 | jMenuBar1 = new javax.swing.JMenuBar(); 82 | jMenu1 = new javax.swing.JMenu(); 83 | openFile = new javax.swing.JRadioButtonMenuItem(); 84 | importDB_MenuItem = new javax.swing.JMenuItem(); 85 | close_menuItem = new javax.swing.JMenuItem(); 86 | jMenu2 = new javax.swing.JMenu(); 87 | UserManual = new javax.swing.JRadioButtonMenuItem(); 88 | 89 | jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); 90 | 91 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 92 | setTitle("Malla Computers"); 93 | 94 | table_Panel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED), "Form")); 95 | 96 | jLabel1.setText("Device ID :"); 97 | 98 | jLabel2.setText("Device name :"); 99 | 100 | jLabel3.setText("Category :"); 101 | 102 | jLabel4.setText("Range level :"); 103 | 104 | jLabel5.setText("Price :"); 105 | 106 | add_Btn.setBackground(new java.awt.Color(0, 102, 204)); 107 | add_Btn.setForeground(new java.awt.Color(0, 0, 0)); 108 | add_Btn.setText("Add Item"); 109 | add_Btn.addActionListener(new java.awt.event.ActionListener() { 110 | public void actionPerformed(java.awt.event.ActionEvent evt) { 111 | add_BtnActionPerformed(evt); 112 | } 113 | }); 114 | 115 | clear_Btn.setBackground(new java.awt.Color(0, 102, 204)); 116 | clear_Btn.setText("Clear"); 117 | clear_Btn.addActionListener(new java.awt.event.ActionListener() { 118 | public void actionPerformed(java.awt.event.ActionEvent evt) { 119 | clear_BtnActionPerformed(evt); 120 | } 121 | }); 122 | 123 | delete_Btn.setBackground(new java.awt.Color(0, 102, 204)); 124 | delete_Btn.setText("Delete"); 125 | delete_Btn.addActionListener(new java.awt.event.ActionListener() { 126 | public void actionPerformed(java.awt.event.ActionEvent evt) { 127 | delete_BtnActionPerformed(evt); 128 | } 129 | }); 130 | 131 | id_TF.addActionListener(new java.awt.event.ActionListener() { 132 | public void actionPerformed(java.awt.event.ActionEvent evt) { 133 | id_TFActionPerformed(evt); 134 | } 135 | }); 136 | id_TF.addKeyListener(new java.awt.event.KeyAdapter() { 137 | public void keyTyped(java.awt.event.KeyEvent evt) { 138 | id_TFKeyTyped(evt); 139 | } 140 | }); 141 | 142 | price_TF.addKeyListener(new java.awt.event.KeyAdapter() { 143 | public void keyTyped(java.awt.event.KeyEvent evt) { 144 | price_TFKeyTyped(evt); 145 | } 146 | }); 147 | 148 | range_BtnGrp.add(Mid_RangeBtn); 149 | Mid_RangeBtn.setText("Mid"); 150 | Mid_RangeBtn.addActionListener(new java.awt.event.ActionListener() { 151 | public void actionPerformed(java.awt.event.ActionEvent evt) { 152 | Mid_RangeBtnActionPerformed(evt); 153 | } 154 | }); 155 | 156 | range_BtnGrp.add(High_rangeBtn); 157 | High_rangeBtn.setText("High"); 158 | High_rangeBtn.addActionListener(new java.awt.event.ActionListener() { 159 | public void actionPerformed(java.awt.event.ActionEvent evt) { 160 | High_rangeBtnActionPerformed(evt); 161 | } 162 | }); 163 | 164 | range_BtnGrp.add(Budget_rangeBTN); 165 | Budget_rangeBTN.setText("Budget"); 166 | Budget_rangeBTN.addActionListener(new java.awt.event.ActionListener() { 167 | public void actionPerformed(java.awt.event.ActionEvent evt) { 168 | Budget_rangeBTNActionPerformed(evt); 169 | } 170 | }); 171 | 172 | category_CB.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Gaming", "Home use", "Business", "High performance", "Customized" })); 173 | category_CB.addActionListener(new java.awt.event.ActionListener() { 174 | public void actionPerformed(java.awt.event.ActionEvent evt) { 175 | category_CBActionPerformed(evt); 176 | } 177 | }); 178 | 179 | exit_Btn.setBackground(new java.awt.Color(0, 102, 204)); 180 | exit_Btn.setText("Exit"); 181 | exit_Btn.addActionListener(new java.awt.event.ActionListener() { 182 | public void actionPerformed(java.awt.event.ActionEvent evt) { 183 | exit_BtnActionPerformed(evt); 184 | } 185 | }); 186 | 187 | jLabel8.setText("Type :"); 188 | 189 | type_CB.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Desktop", "Laptop", "Convertible" })); 190 | 191 | javax.swing.GroupLayout table_PanelLayout = new javax.swing.GroupLayout(table_Panel); 192 | table_Panel.setLayout(table_PanelLayout); 193 | table_PanelLayout.setHorizontalGroup( 194 | table_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 195 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, table_PanelLayout.createSequentialGroup() 196 | .addContainerGap(18, Short.MAX_VALUE) 197 | .addGroup(table_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 198 | .addGroup(table_PanelLayout.createSequentialGroup() 199 | .addGroup(table_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 200 | .addComponent(jLabel1) 201 | .addComponent(jLabel2) 202 | .addComponent(jLabel3) 203 | .addComponent(jLabel4) 204 | .addComponent(jLabel8) 205 | .addComponent(jLabel5)) 206 | .addGap(67, 67, 67) 207 | .addGroup(table_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 208 | .addComponent(price_TF, javax.swing.GroupLayout.PREFERRED_SIZE, 236, javax.swing.GroupLayout.PREFERRED_SIZE) 209 | .addComponent(type_CB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 210 | .addGroup(table_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 211 | .addGroup(table_PanelLayout.createSequentialGroup() 212 | .addComponent(Budget_rangeBTN) 213 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 214 | .addComponent(High_rangeBtn)) 215 | .addComponent(id_TF) 216 | .addComponent(name_TF, javax.swing.GroupLayout.PREFERRED_SIZE, 236, javax.swing.GroupLayout.PREFERRED_SIZE)) 217 | .addGroup(table_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 218 | .addComponent(Mid_RangeBtn) 219 | .addComponent(category_CB, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE)))) 220 | .addGroup(table_PanelLayout.createSequentialGroup() 221 | .addComponent(add_Btn) 222 | .addGap(30, 30, 30) 223 | .addComponent(clear_Btn) 224 | .addGap(30, 30, 30) 225 | .addComponent(delete_Btn) 226 | .addGap(30, 30, 30) 227 | .addComponent(exit_Btn))) 228 | .addGap(58, 58, 58)) 229 | ); 230 | table_PanelLayout.setVerticalGroup( 231 | table_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 232 | .addGroup(table_PanelLayout.createSequentialGroup() 233 | .addContainerGap() 234 | .addGroup(table_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 235 | .addComponent(jLabel1) 236 | .addComponent(id_TF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 237 | .addGap(45, 45, 45) 238 | .addGroup(table_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 239 | .addComponent(jLabel2) 240 | .addComponent(name_TF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 241 | .addGap(45, 45, 45) 242 | .addGroup(table_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 243 | .addComponent(jLabel3) 244 | .addComponent(category_CB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 245 | .addGap(44, 44, 44) 246 | .addGroup(table_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 247 | .addComponent(jLabel4) 248 | .addComponent(Mid_RangeBtn) 249 | .addComponent(High_rangeBtn) 250 | .addComponent(Budget_rangeBTN)) 251 | .addGap(45, 45, 45) 252 | .addGroup(table_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 253 | .addComponent(jLabel8) 254 | .addComponent(type_CB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 255 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE) 256 | .addGroup(table_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 257 | .addComponent(jLabel5) 258 | .addComponent(price_TF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 259 | .addGap(26, 26, 26) 260 | .addGroup(table_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 261 | .addComponent(add_Btn) 262 | .addComponent(clear_Btn) 263 | .addComponent(delete_Btn) 264 | .addComponent(exit_Btn)) 265 | .addContainerGap()) 266 | ); 267 | 268 | jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED), "Personal Computer Information System", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Bahnschrift", 1, 16))); // NOI18N 269 | 270 | computerIS_Tbl.setModel(new javax.swing.table.DefaultTableModel( 271 | new Object [][] { 272 | {null, null, null, null, null, null}, 273 | {null, null, null, null, null, null}, 274 | {null, null, null, null, null, null}, 275 | {null, null, null, null, null, null}, 276 | {null, null, null, null, null, null}, 277 | {null, null, null, null, null, null}, 278 | {null, null, null, null, null, null}, 279 | {null, null, null, null, null, null}, 280 | {null, null, null, null, null, null}, 281 | {null, null, null, null, null, null}, 282 | {null, null, null, null, null, null}, 283 | {null, null, null, null, null, null}, 284 | {null, null, null, null, null, null}, 285 | {null, null, null, null, null, null}, 286 | {null, null, null, null, null, null}, 287 | {null, null, null, null, null, null}, 288 | {null, null, null, null, null, null}, 289 | {null, null, null, null, null, null}, 290 | {null, null, null, null, null, null}, 291 | {null, null, null, null, null, null}, 292 | {null, null, null, null, null, null}, 293 | {null, null, null, null, null, null}, 294 | {null, null, null, null, null, null}, 295 | {null, null, null, null, null, null}, 296 | {null, null, null, null, null, null}, 297 | {null, null, null, null, null, null} 298 | }, 299 | new String [] { 300 | "ID", "Name", "Category", "Range level", "Type", "Price" 301 | } 302 | ) { 303 | boolean[] canEdit = new boolean [] { 304 | false, false, false, false, false, false 305 | }; 306 | 307 | public boolean isCellEditable(int rowIndex, int columnIndex) { 308 | return canEdit [columnIndex]; 309 | } 310 | }); 311 | jScrollPane1.setViewportView(computerIS_Tbl); 312 | 313 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); 314 | jPanel1.setLayout(jPanel1Layout); 315 | jPanel1Layout.setHorizontalGroup( 316 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 317 | .addGroup(jPanel1Layout.createSequentialGroup() 318 | .addContainerGap() 319 | .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 727, Short.MAX_VALUE) 320 | .addContainerGap()) 321 | ); 322 | jPanel1Layout.setVerticalGroup( 323 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 324 | .addGroup(jPanel1Layout.createSequentialGroup() 325 | .addContainerGap() 326 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE) 327 | .addContainerGap(15, Short.MAX_VALUE)) 328 | ); 329 | 330 | jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED), "Search")); 331 | 332 | priceSrch_TF.addActionListener(new java.awt.event.ActionListener() { 333 | public void actionPerformed(java.awt.event.ActionEvent evt) { 334 | priceSrch_TFActionPerformed(evt); 335 | } 336 | }); 337 | priceSrch_TF.addKeyListener(new java.awt.event.KeyAdapter() { 338 | public void keyTyped(java.awt.event.KeyEvent evt) { 339 | priceSrch_TFKeyTyped(evt); 340 | } 341 | }); 342 | 343 | jLabel6.setText("Device Price :"); 344 | 345 | priceSrch_Btn.setBackground(new java.awt.Color(0, 102, 204)); 346 | priceSrch_Btn.setText("Search device"); 347 | priceSrch_Btn.addActionListener(new java.awt.event.ActionListener() { 348 | public void actionPerformed(java.awt.event.ActionEvent evt) { 349 | priceSrch_BtnActionPerformed(evt); 350 | } 351 | }); 352 | 353 | jLabel7.setText("Device category :"); 354 | 355 | categorySearch_CB.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "(Optional)", "Gaming", "Home use", "Business", "High performance", "Customized" })); 356 | categorySearch_CB.addActionListener(new java.awt.event.ActionListener() { 357 | public void actionPerformed(java.awt.event.ActionEvent evt) { 358 | categorySearch_CBActionPerformed(evt); 359 | } 360 | }); 361 | 362 | SortList_Btn.setBackground(new java.awt.Color(0, 102, 204)); 363 | SortList_Btn.setText("Sort List"); 364 | SortList_Btn.addActionListener(new java.awt.event.ActionListener() { 365 | public void actionPerformed(java.awt.event.ActionEvent evt) { 366 | SortList_BtnActionPerformed(evt); 367 | } 368 | }); 369 | 370 | totalCategorySrch_CB.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Gaming", "Home use", "Business", "High performance", "Customized" })); 371 | totalCategorySrch_CB.addActionListener(new java.awt.event.ActionListener() { 372 | public void actionPerformed(java.awt.event.ActionEvent evt) { 373 | totalCategorySrch_CBActionPerformed(evt); 374 | } 375 | }); 376 | 377 | jLabel9.setText("Find total devices in a category"); 378 | 379 | totalDevice.setBackground(new java.awt.Color(0, 102, 204)); 380 | totalDevice.setText("Find"); 381 | totalDevice.addActionListener(new java.awt.event.ActionListener() { 382 | public void actionPerformed(java.awt.event.ActionEvent evt) { 383 | totalDeviceActionPerformed(evt); 384 | } 385 | }); 386 | 387 | javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); 388 | jPanel2.setLayout(jPanel2Layout); 389 | jPanel2Layout.setHorizontalGroup( 390 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 391 | .addGroup(jPanel2Layout.createSequentialGroup() 392 | .addContainerGap() 393 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 394 | .addGroup(jPanel2Layout.createSequentialGroup() 395 | .addComponent(priceSrch_Btn, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE) 396 | .addGap(32, 32, 32) 397 | .addComponent(SortList_Btn, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE) 398 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 399 | .addComponent(totalDevice, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE) 400 | .addGap(83, 83, 83)) 401 | .addGroup(jPanel2Layout.createSequentialGroup() 402 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 403 | .addComponent(jLabel6) 404 | .addComponent(jLabel7)) 405 | .addGap(47, 47, 47) 406 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 407 | .addComponent(categorySearch_CB, 0, 177, Short.MAX_VALUE) 408 | .addComponent(priceSrch_TF)) 409 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 410 | .addGroup(jPanel2Layout.createSequentialGroup() 411 | .addGap(177, 177, 177) 412 | .addComponent(jLabel9) 413 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 414 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() 415 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 416 | .addComponent(totalCategorySrch_CB, javax.swing.GroupLayout.PREFERRED_SIZE, 221, javax.swing.GroupLayout.PREFERRED_SIZE) 417 | .addGap(37, 37, 37)))))) 418 | ); 419 | jPanel2Layout.setVerticalGroup( 420 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 421 | .addGroup(jPanel2Layout.createSequentialGroup() 422 | .addGap(29, 29, 29) 423 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 424 | .addGroup(jPanel2Layout.createSequentialGroup() 425 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 426 | .addComponent(jLabel6) 427 | .addComponent(priceSrch_TF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 428 | .addGap(18, 18, 18) 429 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 430 | .addComponent(jLabel7) 431 | .addComponent(categorySearch_CB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) 432 | .addGroup(jPanel2Layout.createSequentialGroup() 433 | .addGap(1, 1, 1) 434 | .addComponent(jLabel9) 435 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 436 | .addComponent(totalCategorySrch_CB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) 437 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 438 | .addGroup(jPanel2Layout.createSequentialGroup() 439 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 440 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 441 | .addComponent(priceSrch_Btn) 442 | .addComponent(totalDevice)) 443 | .addGap(26, 26, 26)) 444 | .addGroup(jPanel2Layout.createSequentialGroup() 445 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 446 | .addComponent(SortList_Btn) 447 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) 448 | ); 449 | 450 | jMenu1.setText("File"); 451 | 452 | openFile.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK)); 453 | openFile.setSelected(true); 454 | openFile.setText("Open"); 455 | openFile.addActionListener(new java.awt.event.ActionListener() { 456 | public void actionPerformed(java.awt.event.ActionEvent evt) { 457 | openFileActionPerformed(evt); 458 | } 459 | }); 460 | jMenu1.add(openFile); 461 | 462 | importDB_MenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_I, java.awt.event.InputEvent.CTRL_MASK)); 463 | importDB_MenuItem.setText("Import Database file"); 464 | importDB_MenuItem.addActionListener(new java.awt.event.ActionListener() { 465 | public void actionPerformed(java.awt.event.ActionEvent evt) { 466 | importDB_MenuItemActionPerformed(evt); 467 | } 468 | }); 469 | jMenu1.add(importDB_MenuItem); 470 | 471 | close_menuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_BACK_SPACE, java.awt.event.InputEvent.CTRL_MASK)); 472 | close_menuItem.setText("Close"); 473 | close_menuItem.addActionListener(new java.awt.event.ActionListener() { 474 | public void actionPerformed(java.awt.event.ActionEvent evt) { 475 | close_menuItemActionPerformed(evt); 476 | } 477 | }); 478 | jMenu1.add(close_menuItem); 479 | 480 | jMenuBar1.add(jMenu1); 481 | 482 | jMenu2.setText("Help"); 483 | 484 | UserManual.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_M, java.awt.event.InputEvent.CTRL_MASK)); 485 | UserManual.setSelected(true); 486 | UserManual.setText("Open Manual"); 487 | UserManual.addActionListener(new java.awt.event.ActionListener() { 488 | public void actionPerformed(java.awt.event.ActionEvent evt) { 489 | UserManualActionPerformed(evt); 490 | } 491 | }); 492 | jMenu2.add(UserManual); 493 | 494 | jMenuBar1.add(jMenu2); 495 | 496 | setJMenuBar(jMenuBar1); 497 | 498 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 499 | getContentPane().setLayout(layout); 500 | layout.setHorizontalGroup( 501 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 502 | .addGroup(layout.createSequentialGroup() 503 | .addContainerGap() 504 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 505 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 506 | .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 507 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 508 | .addComponent(table_Panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 509 | .addContainerGap()) 510 | ); 511 | layout.setVerticalGroup( 512 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 513 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 514 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 515 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 516 | .addComponent(table_Panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 517 | .addGroup(layout.createSequentialGroup() 518 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 519 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 520 | .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) 521 | .addGap(37, 37, 37)) 522 | ); 523 | 524 | pack(); 525 | }// </editor-fold>//GEN-END:initComponents 526 | 527 | private void id_TFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_id_TFActionPerformed 528 | 529 | }//GEN-LAST:event_id_TFActionPerformed 530 | 531 | private void Mid_RangeBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Mid_RangeBtnActionPerformed 532 | // TODO add your handling code here: 533 | range = "Mid"; 534 | }//GEN-LAST:event_Mid_RangeBtnActionPerformed 535 | 536 | private void High_rangeBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_High_rangeBtnActionPerformed 537 | // TODO add your handling code here: 538 | range = "High"; 539 | }//GEN-LAST:event_High_rangeBtnActionPerformed 540 | 541 | private void Budget_rangeBTNActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Budget_rangeBTNActionPerformed 542 | // TODO add your handling code here: 543 | range = "Budget"; 544 | }//GEN-LAST:event_Budget_rangeBTNActionPerformed 545 | 546 | private void exit_BtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exit_BtnActionPerformed 547 | System.exit(0); 548 | }//GEN-LAST:event_exit_BtnActionPerformed 549 | 550 | private void priceSrch_TFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_priceSrch_TFActionPerformed 551 | // TODO add your handling code here: 552 | }//GEN-LAST:event_priceSrch_TFActionPerformed 553 | 554 | private void add_BtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_add_BtnActionPerformed 555 | String deviceID = id_TF.getText().trim(); 556 | String deviceName = name_TF.getText().trim(); 557 | String devicePrice = price_TF.getText().trim(); 558 | String deviceCategory = category_CB.getSelectedItem().toString(); 559 | String deviceType = type_CB.getSelectedItem().toString(); 560 | validation(deviceID, deviceName, devicePrice, deviceCategory, deviceType); 561 | loadToCSV(); 562 | }//GEN-LAST:event_add_BtnActionPerformed 563 | 564 | private void priceSrch_BtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_priceSrch_BtnActionPerformed 565 | String searchValue = priceSrch_TF.getText().trim(); 566 | String searchCategory = categorySearch_CB.getSelectedItem().toString(); 567 | search_device(searchValue, searchCategory); 568 | }//GEN-LAST:event_priceSrch_BtnActionPerformed 569 | 570 | private void id_TFKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_id_TFKeyTyped 571 | }//GEN-LAST:event_id_TFKeyTyped 572 | 573 | private void price_TFKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_price_TFKeyTyped 574 | char key = evt.getKeyChar(); 575 | if(!(key >= '0' && key <= '9')){ 576 | evt.consume(); 577 | } 578 | }//GEN-LAST:event_price_TFKeyTyped 579 | 580 | private void priceSrch_TFKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_priceSrch_TFKeyTyped 581 | char key = evt.getKeyChar(); 582 | if(!(key >= '0' && key <= '9')){ 583 | evt.consume(); 584 | } 585 | }//GEN-LAST:event_priceSrch_TFKeyTyped 586 | 587 | private void clear_BtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clear_BtnActionPerformed 588 | clearTextFields(); 589 | }//GEN-LAST:event_clear_BtnActionPerformed 590 | 591 | private void delete_BtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_delete_BtnActionPerformed 592 | deleteDevice(); 593 | }//GEN-LAST:event_delete_BtnActionPerformed 594 | 595 | private void SortList_BtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SortList_BtnActionPerformed 596 | // TODO add your handling code here: 597 | sort_ArrayListObject(); 598 | updateTable(); 599 | }//GEN-LAST:event_SortList_BtnActionPerformed 600 | 601 | private void close_menuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_close_menuItemActionPerformed 602 | System.exit(0); 603 | }//GEN-LAST:event_close_menuItemActionPerformed 604 | 605 | private void importDB_MenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_importDB_MenuItemActionPerformed 606 | importFromCSV(); 607 | }//GEN-LAST:event_importDB_MenuItemActionPerformed 608 | 609 | private void category_CBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_category_CBActionPerformed 610 | }//GEN-LAST:event_category_CBActionPerformed 611 | 612 | private void categorySearch_CBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_categorySearch_CBActionPerformed 613 | // TODO add your handling code here: 614 | }//GEN-LAST:event_categorySearch_CBActionPerformed 615 | 616 | private void totalCategorySrch_CBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_totalCategorySrch_CBActionPerformed 617 | // TODO add your handling code here: 618 | }//GEN-LAST:event_totalCategorySrch_CBActionPerformed 619 | 620 | private void totalDeviceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_totalDeviceActionPerformed 621 | totalItemInCategory(); 622 | }//GEN-LAST:event_totalDeviceActionPerformed 623 | 624 | private void openFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openFileActionPerformed 625 | // TODO add your handling code here: 626 | try{ 627 | String path = System.getProperty("user.dir"); 628 | Runtime.getRuntime().exec("rundll32 url.dll, FileProtocolHandler "+path+"\\rights_reserved.pdf"); 629 | }catch(Exception e){ 630 | JOptionPane.showMessageDialog(rootPane, "not found", "error", JOptionPane.ERROR_MESSAGE); 631 | } 632 | }//GEN-LAST:event_openFileActionPerformed 633 | 634 | private void UserManualActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_UserManualActionPerformed 635 | try{ 636 | String path = System.getProperty("user.dir"); 637 | Runtime.getRuntime().exec("rundll32 url.dll, FileProtocolHandler "+path+"\\usermanual.pdf"); 638 | }catch(Exception e){ 639 | JOptionPane.showMessageDialog(rootPane, "not found", "error", JOptionPane.ERROR_MESSAGE); 640 | } 641 | }//GEN-LAST:event_UserManualActionPerformed 642 | public void deleteDevice(){ 643 | try{ 644 | DefaultTableModel model = (DefaultTableModel) computerIS_Tbl.getModel(); 645 | 646 | int deletionRow = computerIS_Tbl.getSelectedRow(); 647 | String checkElement = computerIS_Tbl.getValueAt((deletionRow), 1).toString(); 648 | if(deletionRow == -1){ 649 | JOptionPane.showMessageDialog(rootPane,"Please select a row to delete","Error",JOptionPane.ERROR_MESSAGE); 650 | }else if(checkElement.equals("")){ 651 | JOptionPane.showMessageDialog(rootPane,"An Empty row is selected","Error",JOptionPane.ERROR_MESSAGE); 652 | }else{ 653 | list.remove(deletionRow); 654 | updateTable(); 655 | loadToCSV(); 656 | } 657 | }catch(NullPointerException no){ 658 | JOptionPane.showMessageDialog(rootPane,"An Empty row is selected","Error",JOptionPane.ERROR_MESSAGE); 659 | }catch(ArrayIndexOutOfBoundsException aex){ 660 | JOptionPane.showMessageDialog(rootPane,"Please select a row to delete","Error",JOptionPane.ERROR_MESSAGE); 661 | } 662 | } 663 | public void validation(String deviceID, String deviceName, String devicePrice,String deviceCategory, String deviceType){ 664 | String [] table_Values = {deviceID, deviceName,deviceCategory,range,deviceType, devicePrice}; 665 | if (deviceID.equals("") || deviceName.equals("") || devicePrice.equals("") ){ 666 | JOptionPane.showMessageDialog(rootPane,"Fill the Form to add new device","Empty Form", JOptionPane.ERROR_MESSAGE); 667 | }else if(range_BtnGrp.getSelection()==null){ 668 | JOptionPane.showMessageDialog(rootPane,"Select Device Range Level","Select Range", JOptionPane.ERROR_MESSAGE); 669 | }else{ 670 | int nextRow = 0; 671 | boolean emptyRowCheck = false; 672 | int rowCount = computerIS_Tbl.getRowCount(); 673 | int colCount = computerIS_Tbl.getColumnCount(); 674 | String s; 675 | while (nextRow<rowCount && emptyRowCheck==false){ 676 | s = (String)computerIS_Tbl.getValueAt(nextRow, 0); 677 | if(s!=null && s.length()!=0){ 678 | nextRow++; 679 | }else{ 680 | emptyRowCheck= true; 681 | } 682 | 683 | }if(!Pattern.compile("[L]....").matcher(deviceID).matches()){ 684 | JOptionPane.showMessageDialog(rootPane,"Invalid device ID","Invalid", JOptionPane.ERROR_MESSAGE); 685 | }else{ 686 | for(TableRows tr: list){ 687 | if(deviceID.equals(tr.getID())){ 688 | JOptionPane.showMessageDialog(rootPane,"The device ID has been repeated,\nPlease insert new ID","Device ID", JOptionPane.ERROR_MESSAGE); 689 | return; 690 | } 691 | }if(Budget_rangeBTN.isSelected()){ 692 | if(Integer.parseInt(devicePrice)>=10 && Integer.parseInt(devicePrice)<=1099){ 693 | add_to_table_arraylist(nextRow, rowCount, table_Values, colCount, computerIS_Tbl,deviceID, deviceName,deviceCategory, range, deviceType, devicePrice); 694 | }else{ 695 | JOptionPane.showMessageDialog(rootPane,"The Range for budget range device is in between $10-1099","Price Range Error", JOptionPane.ERROR_MESSAGE); 696 | } 697 | }else if(Mid_RangeBtn.isSelected()){ 698 | if(Integer.parseInt(devicePrice)>=1100 && Integer.parseInt(devicePrice)<=1999){ 699 | add_to_table_arraylist(nextRow, rowCount, table_Values, colCount, computerIS_Tbl,deviceID, deviceName,deviceCategory, range, deviceType, devicePrice); 700 | }else{ 701 | JOptionPane.showMessageDialog(rootPane,"The Range for Mid range is in between $1100-1999","Price Range Error", JOptionPane.ERROR_MESSAGE); 702 | } 703 | }else if(High_rangeBtn.isSelected()){ 704 | if(Integer.parseInt(devicePrice)>=2000 && Integer.parseInt(devicePrice)<=12000){ 705 | add_to_table_arraylist(nextRow, rowCount, table_Values, colCount, computerIS_Tbl,deviceID, deviceName,deviceCategory, range, deviceType, devicePrice); 706 | }else{ 707 | JOptionPane.showMessageDialog(rootPane,"The Range for High range is in between 2000-12000","Price Range Error", JOptionPane.ERROR_MESSAGE); 708 | } 709 | } 710 | 711 | } 712 | } 713 | } 714 | public void add_to_table_arraylist(int nextRow, int rowCount, String [] val , int colcount, JTable abc, String ID, String DN, String DC,String rg, String DT, String DP){ 715 | if(nextRow<rowCount){ 716 | for(int j = 0; j<colcount ; j++){ 717 | abc.setValueAt(val[j],nextRow,j); 718 | } 719 | list.add(new TableRows(ID, DN, DC, rg, DT, DP)); 720 | }else{ 721 | JOptionPane.showMessageDialog(rootPane,"Table Filled","Table Filled", JOptionPane.ERROR_MESSAGE); 722 | } 723 | } 724 | public void clearTextFields(){ 725 | id_TF.setText(""); 726 | name_TF.setText(""); 727 | price_TF.setText(""); 728 | category_CB.setSelectedIndex(0); 729 | type_CB.setSelectedIndex(0); 730 | categorySearch_CB.setSelectedIndex(0); 731 | priceSrch_TF.setText(""); 732 | range_BtnGrp.clearSelection(); 733 | } 734 | public void sort_ArrayListObject(){ 735 | for (int i = 0; i < list.size() - 1; i++){ 736 | int minPos = i; 737 | for(int j = i+1; j < list.size(); j++){ 738 | if(list.get(j).getPrice()<list.get(minPos).getPrice()){ 739 | minPos = j; 740 | } 741 | } 742 | Collections.swap(list, minPos, i); 743 | } 744 | loadToCSV(); 745 | } 746 | 747 | public void updateTable(){ 748 | DefaultTableModel mod = (DefaultTableModel)computerIS_Tbl.getModel(); 749 | mod.setRowCount(0); 750 | mod.setRowCount(26); 751 | for(TableRows tr: list){ 752 | String device[] = {tr.getID(), tr.getName(), tr.getCategory() , tr.getRange_Level() , tr.getType() , Integer.toString(tr.getPrice())}; 753 | int nextRow = 0; 754 | boolean emptyRowCheck = false; 755 | int rowCount = computerIS_Tbl.getRowCount(); 756 | int colCount = computerIS_Tbl.getColumnCount(); 757 | String s; 758 | while (nextRow<rowCount && emptyRowCheck==false){ 759 | s = (String)computerIS_Tbl.getValueAt(nextRow, 0); 760 | if(s!=null && s.length()!=0){ 761 | nextRow++; 762 | }else{ 763 | emptyRowCheck= true; 764 | } 765 | } 766 | if(nextRow<rowCount){ 767 | for(int j = 0; j<colCount ; j++){ 768 | computerIS_Tbl.setValueAt(device[j],nextRow,j); 769 | } 770 | } 771 | } 772 | } 773 | public void search_device(String searchValue1, String searchCategory){ 774 | sort_ArrayListObject(); 775 | if(searchValue1.equals("")){ 776 | JOptionPane.showMessageDialog(rootPane,"Enter Price Value to search","Input error", JOptionPane.ERROR_MESSAGE); 777 | }else{ 778 | int search_Value = Integer.parseInt(searchValue1); 779 | if(searchCategory == "(Optional)"){ 780 | int index = binary_Search(list, 0, list.size()-1, search_Value); 781 | if(index == -1){ 782 | JOptionPane.showMessageDialog(rootPane,"Sorry, no items found according to your preference.","Not Found", JOptionPane.INFORMATION_MESSAGE); 783 | }else{ 784 | String deviceID = list.get(index).getID(); 785 | String deviceName = list.get(index).getName(); 786 | String deviceCategory = list.get(index).getCategory(); 787 | String deviceRange = list.get(index).getRange_Level(); 788 | String deviceType = list.get(index).getType(); 789 | int devicePrice = list.get(index).getPrice(); 790 | JOptionPane.showMessageDialog(rootPane,"The Device of your choice\nDevice ID: "+deviceID+ 791 | "\nDevice Name: "+deviceName+ 792 | "\nDevice Category: "+deviceCategory+ 793 | "\nDevice Range: "+deviceRange+ 794 | "\nDevice Type: "+deviceType+ 795 | "\nDevice Price: $"+devicePrice, 796 | "Device Info", JOptionPane.INFORMATION_MESSAGE); } 797 | }else{ 798 | ArrayList<TableRows> categoryList = new ArrayList(); 799 | for(TableRows s: list){ 800 | if(s.getCategory().equals(searchCategory)){ 801 | categoryList.add(s); 802 | } 803 | } 804 | int index = binary_Search(categoryList, 0, categoryList.size()-1, search_Value); 805 | if(index == -1){ 806 | JOptionPane.showMessageDialog(rootPane,"Sorry, no items found according to your preference.","Not Found", JOptionPane.INFORMATION_MESSAGE); 807 | }else{ 808 | String deviceID = categoryList.get(index).getID(); 809 | String deviceName = categoryList.get(index).getName(); 810 | String deviceCategory = categoryList.get(index).getCategory(); 811 | String deviceRange = categoryList.get(index).getRange_Level(); 812 | String deviceType = categoryList.get(index).getType(); 813 | int devicePrice = categoryList.get(index).getPrice(); 814 | JOptionPane.showMessageDialog(rootPane,"The Device of your choice\nDevice ID: "+deviceID+ 815 | "\nDevice Name: "+deviceName+ 816 | "\nDevice Category: "+deviceCategory+ 817 | "\nDevice Range: "+deviceRange+ 818 | "\nDevice Type: "+deviceType+ 819 | "\nDevice Price: $"+devicePrice, 820 | "Device Info", JOptionPane.INFORMATION_MESSAGE); }}}} 821 | 822 | 823 | public int binary_Search(ArrayList <TableRows> anylist, int low, int high, int searchValue ){ 824 | if(low<=high){ 825 | int mid = (low+high)/2; 826 | if(anylist.get(mid).getPrice()==searchValue){ 827 | return mid; 828 | } else if(anylist.get(mid).getPrice()>searchValue){ 829 | return binary_Search(anylist,low,mid-1,searchValue); 830 | }else{ 831 | return binary_Search(anylist,mid+1,high, searchValue); 832 | } 833 | }else{ 834 | return -1; 835 | } 836 | } 837 | 838 | public void loadToCSV(){ 839 | try{ 840 | File CSVfile = new File("MallaComputers_database.CSV"); 841 | if(!CSVfile.isFile()){ 842 | CSVfile.createNewFile(); 843 | } 844 | FileWriter fw = new FileWriter(CSVfile); 845 | for(TableRows tr: list){ 846 | String device[] = {tr.getID(), tr.getName(), tr.getCategory() , tr.getRange_Level() , tr.getType() , Integer.toString(tr.getPrice())}; 847 | for(int i=0; i<device.length; i++){ 848 | fw.append(device[i]); 849 | if(i == device.length-1){ 850 | break; 851 | } 852 | fw.append(","); 853 | } 854 | fw.append("\n"); 855 | } 856 | fw.flush(); 857 | fw.close(); 858 | }catch (IOException ioex){ 859 | 860 | } 861 | } 862 | 863 | public void importFromCSV(){ 864 | try{ 865 | list.clear(); 866 | DefaultTableModel mod = (DefaultTableModel)computerIS_Tbl.getModel(); 867 | mod.setRowCount(0); 868 | mod.setRowCount(26); 869 | BufferedReader br = new BufferedReader(new FileReader("MallaComputers_database.CSV")); 870 | String one_device = ""; 871 | while((one_device = br.readLine()) != null){ 872 | String []device = one_device.split(","); 873 | 874 | int nextRow = 0; 875 | boolean emptyRowCheck = false; 876 | int rowCount = computerIS_Tbl.getRowCount(); 877 | int colCount = computerIS_Tbl.getColumnCount(); 878 | String s; 879 | while (nextRow<rowCount && emptyRowCheck==false){ 880 | s = (String)computerIS_Tbl.getValueAt(nextRow, 0); 881 | if(s!=null && s.length()!=0){ 882 | nextRow++; 883 | }else{ 884 | emptyRowCheck= true; 885 | } 886 | } 887 | if(nextRow<rowCount){ 888 | for(int j = 0; j<colCount ; j++){ 889 | computerIS_Tbl.setValueAt(device[j],nextRow,j); 890 | } 891 | String devID = device[0]; 892 | String devName = device[1]; 893 | String devCat = device[2]; 894 | String devRange = device[3]; 895 | String devType = device[4]; 896 | String devPrice = device[5]; 897 | list.add(new TableRows(devID, devName, devCat, devRange, devType, devPrice)); 898 | } 899 | 900 | } 901 | }catch(FileNotFoundException fe){ 902 | JOptionPane.showMessageDialog(rootPane,"No files found to open","File Not Found", JOptionPane.INFORMATION_MESSAGE); 903 | }catch(IOException ioe){ 904 | 905 | } 906 | } 907 | 908 | public void totalItemInCategory(){ 909 | sort_ArrayListObject(); 910 | String [] categories = new String[list.size()]; 911 | for(int j = 0; j<list.size(); j++){ 912 | categories[j] = list.get(j).getCategory(); 913 | } 914 | int categoryFound = 0; 915 | String searchCategory = totalCategorySrch_CB.getSelectedItem().toString(); 916 | for(int i = 0; i<categories.length;i++){ 917 | if(categories[i].equals(searchCategory)){ 918 | categoryFound++; 919 | } 920 | } 921 | JOptionPane.showMessageDialog(rootPane,"Total number of device in "+searchCategory+ " category: "+categoryFound,searchCategory+" device information",JOptionPane.INFORMATION_MESSAGE); 922 | } 923 | 924 | /** 925 | * @param args the command line arguments 926 | */ 927 | public static void main(String args[]) { 928 | /* Set the Nimbus look and feel */ 929 | //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> 930 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. 931 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 932 | */ 933 | try { 934 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { 935 | if ("Nimbus".equals(info.getName())) { 936 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); 937 | break; 938 | } 939 | } 940 | } catch (ClassNotFoundException ex) { 941 | java.util.logging.Logger.getLogger(AppliancesInfo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 942 | } catch (InstantiationException ex) { 943 | java.util.logging.Logger.getLogger(AppliancesInfo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 944 | } catch (IllegalAccessException ex) { 945 | java.util.logging.Logger.getLogger(AppliancesInfo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 946 | } catch (javax.swing.UnsupportedLookAndFeelException ex) { 947 | java.util.logging.Logger.getLogger(AppliancesInfo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 948 | } 949 | //</editor-fold> 950 | 951 | /* Create and display the form */ 952 | java.awt.EventQueue.invokeLater(new Runnable() { 953 | public void run() { 954 | new AppliancesInfo().setVisible(true); 955 | } 956 | }); 957 | } 958 | 959 | // Variables declaration - do not modify//GEN-BEGIN:variables 960 | private javax.swing.JRadioButton Budget_rangeBTN; 961 | private javax.swing.JRadioButton High_rangeBtn; 962 | private javax.swing.JRadioButton Mid_RangeBtn; 963 | private javax.swing.JButton SortList_Btn; 964 | private javax.swing.JRadioButtonMenuItem UserManual; 965 | private javax.swing.JButton add_Btn; 966 | private javax.swing.JComboBox<String> categorySearch_CB; 967 | private javax.swing.JComboBox<String> category_CB; 968 | private javax.swing.JButton clear_Btn; 969 | private javax.swing.JMenuItem close_menuItem; 970 | private javax.swing.JTable computerIS_Tbl; 971 | private javax.swing.JButton delete_Btn; 972 | private javax.swing.JButton exit_Btn; 973 | private javax.swing.JTextField id_TF; 974 | private javax.swing.JMenuItem importDB_MenuItem; 975 | private javax.swing.JComboBox<String> jComboBox1; 976 | private javax.swing.JLabel jLabel1; 977 | private javax.swing.JLabel jLabel2; 978 | private javax.swing.JLabel jLabel3; 979 | private javax.swing.JLabel jLabel4; 980 | private javax.swing.JLabel jLabel5; 981 | private javax.swing.JLabel jLabel6; 982 | private javax.swing.JLabel jLabel7; 983 | private javax.swing.JLabel jLabel8; 984 | private javax.swing.JLabel jLabel9; 985 | private javax.swing.JMenu jMenu1; 986 | private javax.swing.JMenu jMenu2; 987 | private javax.swing.JMenuBar jMenuBar1; 988 | private javax.swing.JPanel jPanel1; 989 | private javax.swing.JPanel jPanel2; 990 | private javax.swing.JScrollPane jScrollPane1; 991 | private javax.swing.JTextField name_TF; 992 | private javax.swing.JRadioButtonMenuItem openFile; 993 | private javax.swing.JButton priceSrch_Btn; 994 | private javax.swing.JTextField priceSrch_TF; 995 | private javax.swing.JTextField price_TF; 996 | private javax.swing.ButtonGroup range_BtnGrp; 997 | private javax.swing.JPanel table_Panel; 998 | private javax.swing.JComboBox<String> totalCategorySrch_CB; 999 | private javax.swing.JButton totalDevice; 1000 | private javax.swing.JComboBox<String> type_CB; 1001 | // End of variables declaration//GEN-END:variables 1002 | } 1003 | -------------------------------------------------------------------------------- /src/AppliancesInfo/TableRows.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 | package AppliancesInfo; 7 | 8 | /** 9 | * 10 | * @author Aadesh 11 | */ 12 | public class TableRows { 13 | private String ID; 14 | private String Name; 15 | private String Category; 16 | private String Range_Level; 17 | private String Type; 18 | private int Price; 19 | 20 | public TableRows(String ID, String Name, String Category, String Range_Level, String Type, String Price) { 21 | this.ID = ID; 22 | this.Name = Name; 23 | this.Category = Category; 24 | this.Range_Level = Range_Level; 25 | this.Type = Type; 26 | this.Price = Integer.parseInt(Price); 27 | } 28 | 29 | public String getID() { 30 | return ID; 31 | } 32 | 33 | public String getName() { 34 | return Name; 35 | } 36 | 37 | public String getCategory() { 38 | return Category; 39 | } 40 | 41 | public String getRange_Level() { 42 | return Range_Level; 43 | } 44 | 45 | public String getType() { 46 | return Type; 47 | } 48 | 49 | public int getPrice() { 50 | return Price; 51 | } 52 | 53 | 54 | } 55 | -------------------------------------------------------------------------------- /usermanual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mikasha0/Laptop-Inventory-System--Java-programming/32abcdfc6a83b0d6b2257e42cf5840908872893b/usermanual.pdf --------------------------------------------------------------------------------