├── README.md ├── build.xml ├── build └── classes │ ├── .netbeans_automatic_build │ ├── .netbeans_update_resources │ ├── AddBook.class │ ├── AddStudent.class │ ├── BookDetails$1.class │ ├── BookDetails$2.class │ ├── BookDetails.class │ ├── Forgot.class │ ├── Home.class │ ├── IssueBook.class │ ├── Jar │ ├── jcalendar-tz-1.3.3-4.jar │ └── rs2xml.jar │ ├── LibraryManagementSystem.class │ ├── Loading.class │ ├── Login_user.class │ ├── ReturnBook.class │ ├── Signup.class │ ├── Statistics$1.class │ ├── Statistics.class │ ├── StudentDetails$1.class │ ├── StudentDetails$2.class │ ├── StudentDetails.class │ ├── aboutUs.class │ ├── aboutUs.rs │ ├── conn.class │ ├── icons │ ├── about.png │ ├── addbooks.png │ ├── addstudent.png │ ├── admin.JPG │ ├── eight.png │ ├── fifth.png │ ├── first.jpg │ ├── issue.png │ ├── logo.png │ ├── logo_1.png │ ├── nineth.png │ ├── return.png │ ├── seventh.png │ ├── sixth.png │ ├── stats.png │ └── tenth.png │ └── library │ └── management │ └── system │ ├── BookDetails$1.class │ ├── BookDetails$2.class │ ├── Statistics$1.class │ ├── StudentDetails$1.class │ ├── StudentDetails$2.class │ └── aboutUs.class ├── manifest.mf ├── nbproject ├── build-impl.xml ├── genfiles.properties ├── private │ ├── private.properties │ └── private.xml ├── project.properties └── project.xml └── src ├── AddBook.java ├── AddStudent.java ├── BookDetails.java ├── Forgot.java ├── Home.java ├── IssueBook.java ├── Jar ├── jcalendar-tz-1.3.3-4.jar └── rs2xml.jar ├── LibraryManagementSystem.java ├── Loading.java ├── Login_user.java ├── ReturnBook.java ├── Signup.java ├── Statistics.java ├── StudentDetails.java ├── conn.java └── icons ├── about.png ├── addbooks.png ├── addstudent.png ├── admin.JPG ├── eight.png ├── fifth.png ├── first.jpg ├── issue.png ├── logo.png ├── logo_1.png ├── nineth.png ├── return.png ├── seventh.png ├── sixth.png ├── stats.png └── tenth.png /README.md: -------------------------------------------------------------------------------- 1 | # Library-Management-System 2 | Library management system is all about organizing, managing the library and library-oriented tasks. It also involves maintaining the database of entering new books and the record of books that have been retrieved or issued, with their respective dates. 3 | 4 | # Software Used: 5 | Netbeans IDE 6 | Wamp Server 7 | 8 | # Objective of this project 9 | The main aim of this project is providing an easy to handle and automated library management system. This project also provides features and interface for maintaining librarian’s records, student’s history of issue and fines. 10 | 11 | The owner can easily update, delete and insert data in the database with this project.The following are some of the features provided by this project: 12 | 13 | 1. Login/SignUp. 14 | 2. Add a new students details. 15 | 3. Remove the details of students. 16 | 4. Update the details of students. 17 | 5. Print the details of studnets, etc. 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Builds, tests, and runs the project Liibrary Management System. 12 | 13 | 73 | 74 | -------------------------------------------------------------------------------- /build/classes/.netbeans_automatic_build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/.netbeans_automatic_build -------------------------------------------------------------------------------- /build/classes/.netbeans_update_resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/.netbeans_update_resources -------------------------------------------------------------------------------- /build/classes/AddBook.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/AddBook.class -------------------------------------------------------------------------------- /build/classes/AddStudent.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/AddStudent.class -------------------------------------------------------------------------------- /build/classes/BookDetails$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/BookDetails$1.class -------------------------------------------------------------------------------- /build/classes/BookDetails$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/BookDetails$2.class -------------------------------------------------------------------------------- /build/classes/BookDetails.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/BookDetails.class -------------------------------------------------------------------------------- /build/classes/Forgot.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/Forgot.class -------------------------------------------------------------------------------- /build/classes/Home.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/Home.class -------------------------------------------------------------------------------- /build/classes/IssueBook.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/IssueBook.class -------------------------------------------------------------------------------- /build/classes/Jar/jcalendar-tz-1.3.3-4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/Jar/jcalendar-tz-1.3.3-4.jar -------------------------------------------------------------------------------- /build/classes/Jar/rs2xml.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/Jar/rs2xml.jar -------------------------------------------------------------------------------- /build/classes/LibraryManagementSystem.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/LibraryManagementSystem.class -------------------------------------------------------------------------------- /build/classes/Loading.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/Loading.class -------------------------------------------------------------------------------- /build/classes/Login_user.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/Login_user.class -------------------------------------------------------------------------------- /build/classes/ReturnBook.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/ReturnBook.class -------------------------------------------------------------------------------- /build/classes/Signup.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/Signup.class -------------------------------------------------------------------------------- /build/classes/Statistics$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/Statistics$1.class -------------------------------------------------------------------------------- /build/classes/Statistics.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/Statistics.class -------------------------------------------------------------------------------- /build/classes/StudentDetails$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/StudentDetails$1.class -------------------------------------------------------------------------------- /build/classes/StudentDetails$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/StudentDetails$2.class -------------------------------------------------------------------------------- /build/classes/StudentDetails.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/StudentDetails.class -------------------------------------------------------------------------------- /build/classes/aboutUs.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/aboutUs.class -------------------------------------------------------------------------------- /build/classes/aboutUs.rs: -------------------------------------------------------------------------------- 1 | library.management.system.aboutUs 2 | -------------------------------------------------------------------------------- /build/classes/conn.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/conn.class -------------------------------------------------------------------------------- /build/classes/icons/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/icons/about.png -------------------------------------------------------------------------------- /build/classes/icons/addbooks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/icons/addbooks.png -------------------------------------------------------------------------------- /build/classes/icons/addstudent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/icons/addstudent.png -------------------------------------------------------------------------------- /build/classes/icons/admin.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/icons/admin.JPG -------------------------------------------------------------------------------- /build/classes/icons/eight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/icons/eight.png -------------------------------------------------------------------------------- /build/classes/icons/fifth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/icons/fifth.png -------------------------------------------------------------------------------- /build/classes/icons/first.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/icons/first.jpg -------------------------------------------------------------------------------- /build/classes/icons/issue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/icons/issue.png -------------------------------------------------------------------------------- /build/classes/icons/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/icons/logo.png -------------------------------------------------------------------------------- /build/classes/icons/logo_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/icons/logo_1.png -------------------------------------------------------------------------------- /build/classes/icons/nineth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/icons/nineth.png -------------------------------------------------------------------------------- /build/classes/icons/return.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/icons/return.png -------------------------------------------------------------------------------- /build/classes/icons/seventh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/icons/seventh.png -------------------------------------------------------------------------------- /build/classes/icons/sixth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/icons/sixth.png -------------------------------------------------------------------------------- /build/classes/icons/stats.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/icons/stats.png -------------------------------------------------------------------------------- /build/classes/icons/tenth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/icons/tenth.png -------------------------------------------------------------------------------- /build/classes/library/management/system/BookDetails$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/library/management/system/BookDetails$1.class -------------------------------------------------------------------------------- /build/classes/library/management/system/BookDetails$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/library/management/system/BookDetails$2.class -------------------------------------------------------------------------------- /build/classes/library/management/system/Statistics$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/library/management/system/Statistics$1.class -------------------------------------------------------------------------------- /build/classes/library/management/system/StudentDetails$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/library/management/system/StudentDetails$1.class -------------------------------------------------------------------------------- /build/classes/library/management/system/StudentDetails$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/library/management/system/StudentDetails$2.class -------------------------------------------------------------------------------- /build/classes/library/management/system/aboutUs.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/build/classes/library/management/system/aboutUs.class -------------------------------------------------------------------------------- /manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /nbproject/build-impl.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 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 | Must set src.dir 234 | Must set test.src.dir 235 | Must set build.dir 236 | Must set dist.dir 237 | Must set build.classes.dir 238 | Must set dist.javadoc.dir 239 | Must set build.test.classes.dir 240 | Must set build.test.results.dir 241 | Must set build.classes.excludes 242 | Must set dist.jar 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 | Must set javac.includes 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 | 467 | 468 | 469 | 470 | 471 | 472 | No tests executed. 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | Must set JVM to use for profiling in profiler.info.jvm 723 | Must set profiler agent JVM arguments in profiler.info.jvmargs.agent 724 | 725 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 | 886 | 891 | 892 | 893 | 894 | 895 | 896 | 897 | 898 | 899 | 900 | 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | 922 | 923 | 924 | 925 | 926 | 927 | 928 | 929 | 930 | 931 | 932 | 933 | 934 | 935 | 936 | 937 | 938 | 939 | 940 | 941 | 942 | 943 | 944 | 945 | 946 | 947 | 948 | 949 | 950 | 951 | Must select some files in the IDE or set javac.includes 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 | 960 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 973 | 974 | 975 | 976 | 977 | 978 | 979 | 980 | 981 | 982 | 983 | 984 | 985 | 986 | 987 | 988 | 989 | 990 | 991 | 992 | 993 | 994 | 995 | 996 | 997 | 998 | 999 | 1000 | 1001 | To run this application from the command line without Ant, try: 1002 | 1003 | java -jar "${dist.jar.resolved}" 1004 | 1005 | 1006 | 1007 | 1008 | 1009 | 1010 | 1011 | 1012 | 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | 1021 | 1022 | 1023 | 1024 | 1025 | 1026 | 1027 | 1028 | 1029 | 1030 | 1031 | 1032 | 1033 | 1034 | 1039 | 1040 | 1041 | 1042 | 1043 | 1044 | 1045 | 1046 | 1047 | 1048 | 1049 | 1050 | Must select one file in the IDE or set run.class 1051 | 1052 | 1053 | 1054 | Must select one file in the IDE or set run.class 1055 | 1056 | 1057 | 1062 | 1063 | 1064 | 1065 | 1066 | 1067 | 1068 | 1069 | 1070 | 1071 | 1072 | 1073 | 1074 | 1075 | 1076 | 1077 | 1078 | 1079 | 1080 | 1081 | Must select one file in the IDE or set debug.class 1082 | 1083 | 1084 | 1085 | 1086 | Must select one file in the IDE or set debug.class 1087 | 1088 | 1089 | 1090 | 1091 | Must set fix.includes 1092 | 1093 | 1094 | 1095 | 1096 | 1097 | 1098 | 1103 | 1106 | 1107 | This target only works when run from inside the NetBeans IDE. 1108 | 1109 | 1110 | 1111 | 1112 | 1113 | 1114 | 1115 | 1116 | Must select one file in the IDE or set profile.class 1117 | This target only works when run from inside the NetBeans IDE. 1118 | 1119 | 1120 | 1121 | 1122 | 1123 | 1124 | 1125 | 1126 | This target only works when run from inside the NetBeans IDE. 1127 | 1128 | 1129 | 1130 | 1131 | 1132 | 1133 | 1134 | 1135 | 1136 | 1137 | 1138 | 1139 | This target only works when run from inside the NetBeans IDE. 1140 | 1141 | 1142 | 1143 | 1144 | 1145 | 1146 | 1147 | 1148 | 1149 | 1150 | 1151 | 1152 | 1153 | 1154 | 1155 | 1156 | 1157 | 1158 | 1159 | 1160 | 1161 | 1164 | 1165 | 1166 | 1167 | 1168 | 1169 | 1170 | 1171 | 1172 | 1173 | 1174 | 1175 | 1176 | 1177 | Must select one file in the IDE or set run.class 1178 | 1179 | 1180 | 1181 | 1182 | 1183 | Must select some files in the IDE or set test.includes 1184 | 1185 | 1186 | 1187 | 1188 | Must select one file in the IDE or set run.class 1189 | 1190 | 1191 | 1192 | 1193 | Must select one file in the IDE or set applet.url 1194 | 1195 | 1196 | 1197 | 1202 | 1203 | 1204 | 1205 | 1206 | 1207 | 1208 | 1209 | 1210 | 1211 | 1212 | 1213 | 1214 | 1215 | 1216 | 1217 | 1218 | 1219 | 1220 | 1221 | 1222 | 1223 | 1224 | 1225 | 1226 | 1227 | 1228 | 1229 | 1230 | 1231 | 1232 | 1233 | 1234 | 1235 | 1236 | 1237 | 1238 | 1239 | 1240 | 1241 | 1246 | 1247 | 1248 | 1249 | 1250 | 1251 | 1252 | 1253 | 1254 | 1255 | 1256 | 1257 | 1258 | 1259 | 1260 | 1261 | 1262 | 1263 | 1264 | 1265 | 1266 | 1267 | 1268 | 1269 | 1270 | 1271 | 1272 | Must select some files in the IDE or set javac.includes 1273 | 1274 | 1275 | 1276 | 1277 | 1278 | 1279 | 1280 | 1281 | 1282 | 1283 | 1284 | 1289 | 1290 | 1291 | 1292 | 1293 | 1294 | 1295 | 1296 | Some tests failed; see details above. 1297 | 1298 | 1299 | 1300 | 1301 | 1302 | 1303 | 1304 | 1305 | Must select some files in the IDE or set test.includes 1306 | 1307 | 1308 | 1309 | Some tests failed; see details above. 1310 | 1311 | 1312 | 1313 | Must select some files in the IDE or set test.class 1314 | Must select some method in the IDE or set test.method 1315 | 1316 | 1317 | 1318 | Some tests failed; see details above. 1319 | 1320 | 1321 | 1326 | 1327 | Must select one file in the IDE or set test.class 1328 | 1329 | 1330 | 1331 | Must select one file in the IDE or set test.class 1332 | Must select some method in the IDE or set test.method 1333 | 1334 | 1335 | 1336 | 1337 | 1338 | 1339 | 1340 | 1341 | 1342 | 1343 | 1344 | 1349 | 1350 | Must select one file in the IDE or set applet.url 1351 | 1352 | 1353 | 1354 | 1355 | 1356 | 1357 | 1362 | 1363 | Must select one file in the IDE or set applet.url 1364 | 1365 | 1366 | 1367 | 1368 | 1369 | 1370 | 1371 | 1376 | 1377 | 1378 | 1379 | 1380 | 1381 | 1382 | 1383 | 1384 | 1385 | 1386 | 1387 | 1388 | 1389 | 1390 | 1391 | 1392 | 1393 | 1394 | 1395 | 1396 | 1397 | 1398 | 1399 | 1400 | 1401 | 1402 | 1403 | 1404 | 1405 | 1406 | 1407 | 1408 | 1409 | 1410 | 1411 | 1412 | 1413 | 1414 | 1415 | 1416 | 1417 | 1418 | 1419 | 1420 | 1421 | -------------------------------------------------------------------------------- /nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=870b8424 2 | build.xml.script.CRC32=730469c2 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=870b8424 7 | nbproject/build-impl.xml.script.CRC32=b7c8d66f 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\\Monu\\AppData\\Roaming\\NetBeans\\8.2rc\\build.properties 3 | -------------------------------------------------------------------------------- /nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | file:/C:/Users/Monu/Documents/NetBeansProjects/Library%20Management%20System/src/Login_user.java 7 | file:/C:/Users/Monu/Documents/NetBeansProjects/Library%20Management%20System/src/Home.java 8 | file:/C:/Users/Monu/Documents/NetBeansProjects/Library%20Management%20System/src/aboutUs.java 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /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}/Liibrary_Management_System.jar 28 | dist.javadoc.dir=${dist.dir}/javadoc 29 | excludes= 30 | file.reference.jcalendar-tz-1.3.3-4.jar=C:\\Users\\Monu\\Desktop\\GIthub's Projects\\Library-Management-System-master\\Library-Management-System\\src\\library\\management\\system\\Jar\\jcalendar-tz-1.3.3-4.jar 31 | file.reference.rs2xml.jar=C:\\Users\\Monu\\Desktop\\GIthub's Projects\\Library-Management-System-master\\Library-Management-System\\src\\library\\management\\system\\Jar\\rs2xml.jar 32 | includes=** 33 | jar.compress=false 34 | javac.classpath=\ 35 | ${file.reference.jcalendar-tz-1.3.3-4.jar}:\ 36 | ${file.reference.rs2xml.jar}:\ 37 | ${libs.MySQLDriver.classpath} 38 | # Space-separated list of extra javac options 39 | javac.compilerargs= 40 | javac.deprecation=false 41 | javac.external.vm=true 42 | javac.processorpath=\ 43 | ${javac.classpath} 44 | javac.source=1.8 45 | javac.target=1.8 46 | javac.test.classpath=\ 47 | ${javac.classpath}:\ 48 | ${build.classes.dir} 49 | javac.test.processorpath=\ 50 | ${javac.test.classpath} 51 | javadoc.additionalparam= 52 | javadoc.author=false 53 | javadoc.encoding=${source.encoding} 54 | javadoc.noindex=false 55 | javadoc.nonavbar=false 56 | javadoc.notree=false 57 | javadoc.private=false 58 | javadoc.splitindex=true 59 | javadoc.use=true 60 | javadoc.version=false 61 | javadoc.windowtitle= 62 | main.class=Login_user 63 | manifest.file=manifest.mf 64 | meta.inf.dir=${src.dir}/META-INF 65 | mkdist.disabled=false 66 | platform.active=default_platform 67 | run.classpath=\ 68 | ${javac.classpath}:\ 69 | ${build.classes.dir} 70 | # Space-separated list of JVM arguments used when running the project. 71 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. 72 | # To set system properties for unit tests define test-sys-prop.name=value: 73 | run.jvmargs= 74 | run.test.classpath=\ 75 | ${javac.test.classpath}:\ 76 | ${build.test.classes.dir} 77 | source.encoding=UTF-8 78 | src.dir=src 79 | test.src.dir=test 80 | -------------------------------------------------------------------------------- /nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | Liibrary Management System 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/AddBook.java: -------------------------------------------------------------------------------- 1 | 2 | 3 | import java.awt.*; 4 | import javax.swing.*; 5 | import javax.swing.border.*; 6 | import java.awt.event.*; 7 | import java.sql.*; 8 | import java.util.*; 9 | 10 | public class AddBook extends JFrame implements ActionListener{ 11 | 12 | private JPanel contentPane; 13 | private JTextField t1,t2,t3,t4,t5,t6; 14 | private JButton b1,b2; 15 | JComboBox comboBox; 16 | 17 | public static void main(String[] args) { 18 | new AddBook().setVisible(true); 19 | } 20 | 21 | public void random() { 22 | Random rd = new Random(); 23 | t1.setText("" + rd.nextInt(1000 + 1)); 24 | } 25 | 26 | public AddBook() { 27 | setBounds(600, 200, 518, 442); 28 | contentPane = new JPanel(); 29 | contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); 30 | setContentPane(contentPane); 31 | contentPane.setLayout(null); 32 | 33 | JLabel l1 = new JLabel("Name"); 34 | l1.setForeground(new Color(47, 79, 79)); 35 | l1.setFont(new Font("Tahoma", Font.BOLD, 14)); 36 | l1.setBounds(73, 84, 90, 22); 37 | contentPane.add(l1); 38 | 39 | JLabel l2 = new JLabel("ISBN"); 40 | l2.setForeground(new Color(47, 79, 79)); 41 | l2.setFont(new Font("Tahoma", Font.BOLD, 14)); 42 | l2.setBounds(73, 117, 90, 22); 43 | contentPane.add(l2); 44 | 45 | JLabel l3 = new JLabel("Publisher"); 46 | l3.setForeground(new Color(47, 79, 79)); 47 | l3.setFont(new Font("Tahoma", Font.BOLD, 14)); 48 | l3.setBounds(73, 150, 90, 22); 49 | contentPane.add(l3); 50 | 51 | JLabel l4 = new JLabel("Price"); 52 | l4.setForeground(new Color(47, 79, 79)); 53 | l4.setFont(new Font("Tahoma", Font.BOLD, 14)); 54 | l4.setBounds(73, 216, 90, 22); 55 | contentPane.add(l4); 56 | 57 | JLabel l5 = new JLabel("Pages"); 58 | l5.setForeground(new Color(47, 79, 79)); 59 | l5.setFont(new Font("Tahoma", Font.BOLD, 14)); 60 | l5.setBounds(73, 249, 90, 22); 61 | contentPane.add(l5); 62 | 63 | JLabel l6 = new JLabel("Book_id"); 64 | l6.setForeground(new Color(47, 79, 79)); 65 | l6.setFont(new Font("Tahoma", Font.BOLD, 14)); 66 | l6.setBounds(73, 51, 90, 22); 67 | contentPane.add(l6); 68 | 69 | JLabel l7 = new JLabel("Edition"); 70 | l7.setForeground(new Color(47, 79, 79)); 71 | l7.setFont(new Font("Tahoma", Font.BOLD, 14)); 72 | l7.setBounds(73, 183, 90, 22); 73 | contentPane.add(l7); 74 | 75 | t1 = new JTextField(); 76 | t1.setForeground(new Color(47, 79, 79)); 77 | t1.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 78 | t1.setBounds(169, 54, 198, 20); 79 | contentPane.add(t1); 80 | t1.setColumns(10); 81 | 82 | t2 = new JTextField(); 83 | t2.setForeground(new Color(47, 79, 79)); 84 | t2.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 85 | t2.setColumns(10); 86 | t2.setBounds(169, 87, 198, 20); 87 | contentPane.add(t2); 88 | 89 | t3 = new JTextField(); 90 | t3.setForeground(new Color(47, 79, 79)); 91 | t3.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 92 | t3.setColumns(10); 93 | t3.setBounds(169, 120, 198, 20); 94 | contentPane.add(t3); 95 | 96 | t4 = new JTextField(); 97 | t4.setForeground(new Color(47, 79, 79)); 98 | t4.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 99 | t4.setColumns(10); 100 | t4.setBounds(169, 153, 198, 20); 101 | contentPane.add(t4); 102 | 103 | t5 = new JTextField(); 104 | t5.setForeground(new Color(47, 79, 79)); 105 | t5.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 106 | t5.setColumns(10); 107 | t5.setBounds(169, 219, 198, 20); 108 | contentPane.add(t5); 109 | 110 | t6 = new JTextField(); 111 | t6.setForeground(new Color(47, 79, 79)); 112 | t6.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 113 | t6.setColumns(10); 114 | t6.setBounds(169, 252, 198, 20); 115 | contentPane.add(t6); 116 | 117 | comboBox = new JComboBox(); 118 | comboBox.setModel(new DefaultComboBoxModel(new String[] { "1", "2", "3", "4", "5", "6", "7", "8", "9" })); 119 | comboBox.setBounds(173, 186, 194, 20); 120 | contentPane.add(comboBox); 121 | 122 | b1 = new JButton("Add"); 123 | b1.addActionListener(this); 124 | b1.setBorder(new CompoundBorder(new LineBorder(new Color(128, 128, 128)), null)); 125 | b1.setFont(new Font("Trebuchet MS", Font.BOLD, 15)); 126 | b1.setBounds(102, 300, 100, 33); 127 | b1.setBackground(Color.BLACK); 128 | b1.setForeground(Color.WHITE); 129 | contentPane.add(b1); 130 | 131 | b2 = new JButton("Back"); 132 | b2.addActionListener(this); 133 | b2.setBorder(new CompoundBorder(new LineBorder(new Color(105, 105, 105)), null)); 134 | b2.setFont(new Font("Trebuchet MS", Font.BOLD, 15)); 135 | b2.setBounds(212, 300, 108, 33); 136 | b2.setBackground(Color.BLACK); 137 | b2.setForeground(Color.WHITE); 138 | 139 | contentPane.add(b2); 140 | 141 | JPanel panel = new JPanel(); 142 | panel.setBorder(new TitledBorder(new LineBorder(new Color(138, 43, 226), 2), "Add Books", TitledBorder.LEADING, 143 | TitledBorder.TOP, null, new Color(0, 0, 255))); 144 | panel.setBounds(10, 29, 398, 344); 145 | contentPane.add(panel); 146 | 147 | panel.setBackground(Color.WHITE); 148 | contentPane.setBackground(Color.WHITE); 149 | random(); 150 | 151 | } 152 | 153 | public void actionPerformed(ActionEvent ae){ 154 | try{ 155 | conn con = new conn(); 156 | if(ae.getSource() == b1){ 157 | String sql = "insert into book(book_id, name, isbn, publisher, edition, price, pages) values(?, ?, ?, ?, ?, ?, ?)"; 158 | PreparedStatement st = con.c.prepareStatement(sql); 159 | // st.setInt(1, Integer.parseInt(textField.getText())); 160 | st.setString(1, t1.getText()); 161 | st.setString(2, t2.getText()); 162 | st.setString(3, t3.getText()); 163 | st.setString(4, t4.getText()); 164 | st.setString(5, (String) comboBox.getSelectedItem()); 165 | st.setString(6, t5.getText()); 166 | st.setString(7, t6.getText()); 167 | 168 | int rs = st.executeUpdate(); 169 | if (rs > 0) 170 | JOptionPane.showMessageDialog(null, "Successfully Added"); 171 | else 172 | JOptionPane.showMessageDialog(null, "Error"); 173 | t1.setText(""); 174 | t2.setText(""); 175 | t3.setText(""); 176 | t4.setText(""); 177 | t5.setText(""); 178 | t6.setText(""); 179 | st.close(); 180 | } 181 | if(ae.getSource() == b2){ 182 | this.setVisible(false); 183 | new Home().setVisible(true); 184 | 185 | } 186 | con.c.close(); 187 | }catch(Exception e){ 188 | 189 | } 190 | } 191 | } 192 | -------------------------------------------------------------------------------- /src/AddStudent.java: -------------------------------------------------------------------------------- 1 | 2 | 3 | import java.awt.*; 4 | import javax.swing.*; 5 | import javax.swing.border.*; 6 | import java.awt.event.*; 7 | import java.sql.*; 8 | import java.util.*; 9 | 10 | public class AddStudent extends JFrame implements ActionListener{ 11 | 12 | private JPanel contentPane; 13 | private JTextField t1,t2,t3; 14 | private JComboBox comboBox, comboBox_1, comboBox_2, comboBox_3; 15 | JButton b1,b2; 16 | 17 | public static void main(String[] args) { 18 | new AddStudent().setVisible(true); 19 | } 20 | 21 | public void random() { 22 | Random rd = new Random(); 23 | t1.setText("" + rd.nextInt(10000 + 1)); 24 | } 25 | 26 | public AddStudent() { 27 | super("Add Student"); 28 | setBounds(700, 200, 550, 450); 29 | contentPane = new JPanel(); 30 | contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); 31 | setContentPane(contentPane); 32 | contentPane.setLayout(null); 33 | 34 | JLabel l1 = new JLabel("Student_id"); 35 | l1.setForeground(new Color(25, 25, 112)); 36 | l1.setFont(new Font("Tahoma", Font.BOLD, 14)); 37 | l1.setBounds(64, 63, 102, 22); 38 | contentPane.add(l1); 39 | 40 | JLabel l2 = new JLabel("Name"); 41 | l2.setForeground(new Color(25, 25, 112)); 42 | l2.setFont(new Font("Tahoma", Font.BOLD, 14)); 43 | l2.setBounds(64, 97, 102, 22); 44 | contentPane.add(l2); 45 | 46 | JLabel l3 = new JLabel("Father's Name"); 47 | l3.setForeground(new Color(25, 25, 112)); 48 | l3.setFont(new Font("Tahoma", Font.BOLD, 14)); 49 | l3.setBounds(64, 130, 102, 22); 50 | contentPane.add(l3); 51 | 52 | JLabel l4 = new JLabel("Branch"); 53 | l4.setForeground(new Color(25, 25, 112)); 54 | l4.setFont(new Font("Tahoma", Font.BOLD, 14)); 55 | l4.setBounds(64, 209, 102, 22); 56 | contentPane.add(l4); 57 | 58 | JLabel l5 = new JLabel("Year"); 59 | l5.setForeground(new Color(25, 25, 112)); 60 | l5.setFont(new Font("Tahoma", Font.BOLD, 14)); 61 | l5.setBounds(64, 242, 102, 22); 62 | contentPane.add(l5); 63 | 64 | JLabel l6 = new JLabel("Semester"); 65 | l6.setForeground(new Color(25, 25, 112)); 66 | l6.setFont(new Font("Tahoma", Font.BOLD, 14)); 67 | l6.setBounds(64, 275, 102, 22); 68 | contentPane.add(l6); 69 | 70 | t1 = new JTextField(); 71 | t1.setEditable(false); 72 | t1.setForeground(new Color(47, 79, 79)); 73 | t1.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 74 | t1.setBounds(174, 66, 156, 20); 75 | contentPane.add(t1); 76 | t1.setColumns(10); 77 | 78 | t2 = new JTextField(); 79 | t2.setForeground(new Color(47, 79, 79)); 80 | t2.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 81 | t2.setColumns(10); 82 | t2.setBounds(174, 100, 156, 20); 83 | contentPane.add(t2); 84 | 85 | t3 = new JTextField(); 86 | t3.setForeground(new Color(47, 79, 79)); 87 | t3.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 88 | t3.setColumns(10); 89 | t3.setBounds(174, 133, 156, 20); 90 | contentPane.add(t3); 91 | 92 | comboBox = new JComboBox(); 93 | comboBox.setModel(new DefaultComboBoxModel(new String[] { "Mechanical", "CSE", "IT", "Civil", "Automobile", "EEE", "Other" })); 94 | comboBox.setForeground(new Color(47, 79, 79)); 95 | comboBox.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 96 | comboBox.setBounds(176, 211, 154, 20); 97 | contentPane.add(comboBox); 98 | 99 | comboBox_1 = new JComboBox(); 100 | comboBox_1.setModel(new DefaultComboBoxModel(new String[] { "First", "Second", "Third", "Four" })); 101 | comboBox_1.setForeground(new Color(47, 79, 79)); 102 | comboBox_1.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 103 | comboBox_1.setBounds(176, 244, 154, 20); 104 | contentPane.add(comboBox_1); 105 | 106 | comboBox_2 = new JComboBox(); 107 | comboBox_2.setModel( 108 | new DefaultComboBoxModel(new String[] { "1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th" })); 109 | comboBox_2.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 110 | comboBox_2.setForeground(new Color(47, 79, 79)); 111 | comboBox_2.setBounds(176, 277, 154, 20); 112 | contentPane.add(comboBox_2); 113 | 114 | b1 = new JButton("ADD"); 115 | b1.addActionListener(this); 116 | b1.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 117 | b1.setBounds(64, 321, 111, 33); 118 | b1.setBackground(Color.BLACK); 119 | b1.setForeground(Color.WHITE); 120 | contentPane.add(b1); 121 | 122 | b2 = new JButton("Back"); 123 | b2.addActionListener(this); 124 | b2.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 125 | b2.setBounds(198, 321, 111, 33); 126 | b2.setBackground(Color.BLACK); 127 | b2.setForeground(Color.WHITE); 128 | contentPane.add(b2); 129 | 130 | JLabel l7 = new JLabel("Course"); 131 | l7.setForeground(new Color(25, 25, 112)); 132 | l7.setFont(new Font("Tahoma", Font.BOLD, 14)); 133 | l7.setBounds(64, 173, 102, 22); 134 | contentPane.add(l7); 135 | 136 | comboBox_3 = new JComboBox(); 137 | comboBox_3.setModel(new DefaultComboBoxModel( 138 | new String[] { "B.E", "B.Tech", "M.Tech", "MBA", "BBA", "BCA", "B.Sc", "M.Sc", "B.Com", "M.Com" })); 139 | comboBox_3.setForeground(new Color(47, 79, 79)); 140 | comboBox_3.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 141 | comboBox_3.setBounds(176, 176, 154, 20); 142 | contentPane.add(comboBox_3); 143 | 144 | JPanel panel = new JPanel(); 145 | panel.setBorder(new TitledBorder(new LineBorder(new Color(102, 205, 170), 2, true), "Add-Student", 146 | TitledBorder.LEADING, TitledBorder.TOP, null, new Color(30, 144, 255))); 147 | panel.setBackground(new Color(211, 211, 211)); 148 | panel.setBounds(10, 38, 358, 348); 149 | 150 | contentPane.setBackground(Color.WHITE); 151 | panel.setBackground(Color.WHITE); 152 | 153 | contentPane.add(panel); 154 | random(); 155 | } 156 | 157 | public void actionPerformed(ActionEvent ae){ 158 | try{ 159 | 160 | if(ae.getSource() == b1){ 161 | try{ 162 | conn con = new conn(); 163 | String sql = "insert into student(student_id, name, father, course, branch, year, semester) values(?, ?, ?, ?, ?, ?, ?)"; 164 | PreparedStatement st = con.c.prepareStatement(sql); 165 | st.setString(1, t1.getText()); 166 | st.setString(2, t2.getText()); 167 | st.setString(3, t3.getText()); 168 | st.setString(4, (String) comboBox_3.getSelectedItem()); 169 | st.setString(5, (String) comboBox.getSelectedItem()); 170 | st.setString(6, (String) comboBox_1.getSelectedItem()); 171 | st.setString(7, (String) comboBox_2.getSelectedItem()); 172 | 173 | int i = st.executeUpdate(); 174 | if (i > 0){ 175 | JOptionPane.showMessageDialog(null, "Successfully Added"); 176 | this.setVisible(false); 177 | new Home().setVisible(true); 178 | } 179 | else 180 | JOptionPane.showMessageDialog(null, "error"); 181 | }catch(Exception e){ 182 | e.printStackTrace(); 183 | } 184 | } 185 | 186 | if(ae.getSource() == b2){ 187 | this.setVisible(false); 188 | new Home().setVisible(true); 189 | } 190 | }catch(Exception e){ 191 | 192 | } 193 | } 194 | } 195 | 196 | -------------------------------------------------------------------------------- /src/BookDetails.java: -------------------------------------------------------------------------------- 1 | 2 | 3 | import java.awt.*; 4 | import javax.swing.*; 5 | import javax.swing.border.*; 6 | import net.proteanit.sql.DbUtils; 7 | import java.sql.*; 8 | import java.awt.event.*; 9 | 10 | public class BookDetails extends JFrame implements ActionListener{ 11 | 12 | private JPanel contentPane; 13 | private JTable table; 14 | private JTextField search; 15 | private JButton b1,b2,b3; 16 | 17 | public static void main(String[] args) { 18 | new BookDetails().setVisible(true); 19 | } 20 | 21 | public void Book() { 22 | try { 23 | conn con = new conn(); 24 | String sql = "select * from book"; 25 | PreparedStatement st = con.c.prepareStatement(sql); 26 | ResultSet rs = st.executeQuery(); 27 | 28 | table.setModel(DbUtils.resultSetToTableModel(rs)); 29 | rs.close(); 30 | st.close(); 31 | con.c.close(); 32 | } catch (Exception e) { 33 | 34 | } 35 | } 36 | 37 | public BookDetails() { 38 | setBounds(350, 200, 890, 475); 39 | contentPane = new JPanel(); 40 | contentPane.setBackground(Color.WHITE); 41 | contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); 42 | setContentPane(contentPane); 43 | contentPane.setLayout(null); 44 | 45 | JScrollPane scrollPane = new JScrollPane(); 46 | scrollPane.setBounds(79, 133, 771, 282); 47 | contentPane.add(scrollPane); 48 | 49 | table = new JTable(); 50 | table.addMouseListener(new MouseAdapter() { 51 | @Override 52 | public void mouseClicked(MouseEvent arg0) { 53 | int row = table.getSelectedRow(); 54 | search.setText(table.getModel().getValueAt(row, 1).toString()); 55 | } 56 | }); 57 | table.setBackground(new Color(240, 248, 255)); 58 | table.setForeground(Color.DARK_GRAY); 59 | table.setFont(new Font("Trebuchet MS", Font.BOLD, 16)); 60 | scrollPane.setViewportView(table); 61 | 62 | JButton b1 = new JButton("Search"); 63 | b1.addActionListener(this); 64 | b1.setBorder(new LineBorder(new Color(255, 20, 147), 2, true)); 65 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("library/management/system/icons/eight.png")); 66 | Image i2 = i1.getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT); 67 | ImageIcon i3 = new ImageIcon(i2); 68 | b1.setIcon(i3); 69 | b1.setForeground(new Color(199, 21, 133)); 70 | b1.setFont(new Font("Trebuchet MS", Font.BOLD, 18)); 71 | b1.setBounds(564, 89, 138, 33); 72 | contentPane.add(b1); 73 | 74 | JButton b2 = new JButton("Delete"); 75 | b2.addActionListener(this); 76 | ImageIcon i4 = new ImageIcon(ClassLoader.getSystemResource("library/management/system/icons/nineth.png")); 77 | Image i5 = i4.getImage().getScaledInstance(30, 30, Image.SCALE_DEFAULT); 78 | ImageIcon i6 = new ImageIcon(i5); 79 | b2.setIcon(i6); 80 | b2.setForeground(new Color(199, 21, 133)); 81 | b2.setFont(new Font("Trebuchet MS", Font.BOLD, 18)); 82 | b2.setBorder(new LineBorder(new Color(255, 20, 147), 2, true)); 83 | b2.setBounds(712, 89, 138, 33); 84 | contentPane.add(b2); 85 | 86 | 87 | JLabel l1 = new JLabel("Book Details"); 88 | l1.setForeground(new Color(107, 142, 35)); 89 | l1.setFont(new Font("Trebuchet MS", Font.BOLD | Font.ITALIC, 30)); 90 | l1.setBounds(300, 15, 400, 47); 91 | contentPane.add(l1); 92 | 93 | 94 | search = new JTextField(); 95 | search.setBackground(new Color(255, 240, 245)); 96 | search.setBorder(new LineBorder(new Color(255, 105, 180), 2, true)); 97 | search.setForeground(new Color(47, 79, 79)); 98 | search.setFont(new Font("Trebuchet MS", Font.BOLD | Font.ITALIC, 17)); 99 | search.setBounds(189, 89, 357, 33); 100 | contentPane.add(search); 101 | search.setColumns(10); 102 | 103 | JLabel l3 = new JLabel("Back"); 104 | l3.addMouseListener(new MouseAdapter() { 105 | @Override 106 | public void mouseClicked(MouseEvent e) { 107 | setVisible(false); 108 | Home home = new Home(); 109 | home.setVisible(true); 110 | } 111 | }); 112 | l3.setForeground(Color.GRAY); 113 | l3.setFont(new Font("Trebuchet MS", Font.BOLD, 18)); 114 | ImageIcon i7 = new ImageIcon(ClassLoader.getSystemResource("library/management/system/icons/tenth.png")); 115 | Image i8 = i7.getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT); 116 | ImageIcon i9 = new ImageIcon(i8); 117 | l3.setIcon(i9); 118 | l3.setBounds(97, 89, 72, 33); 119 | contentPane.add(l3); 120 | 121 | JPanel panel = new JPanel(); 122 | panel.setBorder(new TitledBorder(new LineBorder(new Color(0, 128, 128), 3, true), "Book-Details", 123 | TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 128, 0))); 124 | panel.setBounds(67, 54, 793, 368); 125 | contentPane.add(panel); 126 | panel.setBackground(Color.WHITE); 127 | Book(); 128 | } 129 | 130 | public void actionPerformed(ActionEvent ae){ 131 | try{ 132 | 133 | conn con = new conn(); 134 | if(ae.getSource() == b1){ 135 | 136 | String sql = "select * from book where concat(name, book_id) like ?"; 137 | PreparedStatement st = con.c.prepareStatement(sql); 138 | st.setString(1, "%" + search.getText() + "%"); 139 | ResultSet rs = st.executeQuery(); 140 | 141 | table.setModel(DbUtils.resultSetToTableModel(rs)); 142 | rs.close(); 143 | st.close(); 144 | 145 | } 146 | if(ae.getSource() == b2){ 147 | String sql = "delete from book where name = '" + search.getText() + "'"; 148 | PreparedStatement st = con.c.prepareStatement(sql); 149 | 150 | JDialog.setDefaultLookAndFeelDecorated(true); 151 | int response = JOptionPane.showConfirmDialog(null, "Do you want to continue?", "Confirm", 152 | JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); 153 | if (response == JOptionPane.NO_OPTION) { 154 | 155 | } else if (response == JOptionPane.YES_OPTION) { 156 | int rs = st.executeUpdate(); 157 | JOptionPane.showMessageDialog(null, "Deleted !!"); 158 | } else if (response == JOptionPane.CLOSED_OPTION) { 159 | 160 | } 161 | st.close(); 162 | 163 | 164 | } 165 | 166 | con.c.close(); 167 | }catch(Exception e){ 168 | 169 | } 170 | } 171 | } 172 | -------------------------------------------------------------------------------- /src/Forgot.java: -------------------------------------------------------------------------------- 1 | 2 | import java.awt.*; 3 | import javax.swing.*; 4 | import javax.swing.border.*; 5 | import java.sql.*; 6 | import java.awt.event.*; 7 | 8 | public class Forgot extends JFrame implements ActionListener{ 9 | 10 | private JPanel contentPane; 11 | private JTextField t1,t2,t3,t4,t5; 12 | private JButton b1,b2,b3; 13 | 14 | public static void main(String[] args) { 15 | new Forgot().setVisible(true); 16 | } 17 | 18 | public Forgot() { 19 | 20 | setBounds(500, 200, 650, 500); 21 | contentPane = new JPanel(); 22 | contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); 23 | setContentPane(contentPane); 24 | contentPane.setBackground(Color.WHITE); 25 | contentPane.setLayout(null); 26 | 27 | JLabel l1 = new JLabel("Username"); 28 | l1.setFont(new Font("Tahoma", Font.BOLD, 13)); 29 | l1.setBounds(109, 83, 87, 29); 30 | contentPane.add(l1); 31 | 32 | JLabel l2 = new JLabel("Name"); 33 | l2.setFont(new Font("Tahoma", Font.BOLD, 13)); 34 | l2.setBounds(109, 122, 75, 21); 35 | contentPane.add(l2); 36 | 37 | JLabel l3 = new JLabel("Your Security Question"); 38 | l3.setFont(new Font("Tahoma", Font.BOLD, 13)); 39 | l3.setBounds(109, 154, 156, 27); 40 | contentPane.add(l3); 41 | 42 | JLabel l4 = new JLabel("Answer"); 43 | l4.setFont(new Font("Tahoma", Font.BOLD, 13)); 44 | l4.setBounds(109, 192, 104, 21); 45 | contentPane.add(l4); 46 | 47 | JLabel l5 = new JLabel("Password"); 48 | l5.setFont(new Font("Tahoma", Font.BOLD, 13)); 49 | l5.setBounds(109, 224, 104, 21); 50 | contentPane.add(l5); 51 | 52 | t1 = new JTextField(); 53 | t1.setFont(new Font("Tahoma", Font.BOLD, 13)); 54 | t1.setForeground(new Color(105, 105, 105)); 55 | t1.setBounds(277, 88, 139, 20); 56 | contentPane.add(t1); 57 | t1.setColumns(10); 58 | 59 | t2 = new JTextField(); 60 | t2.setEditable(false); 61 | t2.setFont(new Font("Tahoma", Font.BOLD, 13)); 62 | t2.setForeground(new Color(165, 42, 42)); 63 | t2.setColumns(10); 64 | t2.setBounds(277, 123, 139, 20); 65 | contentPane.add(t2); 66 | 67 | t3 = new JTextField(); 68 | t3.setEditable(false); 69 | t3.setFont(new Font("Tahoma", Font.BOLD, 12)); 70 | t3.setForeground(new Color(72, 61, 139)); 71 | t3.setColumns(10); 72 | t3.setBounds(277, 161, 221, 20); 73 | contentPane.add(t3); 74 | 75 | t4 = new JTextField(); 76 | t4.setFont(new Font("Tahoma", Font.BOLD, 13)); 77 | t4.setForeground(new Color(205, 92, 92)); 78 | t4.setColumns(10); 79 | t4.setBounds(277, 193, 139, 20); 80 | contentPane.add(t4); 81 | 82 | t5 = new JTextField(); 83 | t5.setEditable(false); 84 | t5.setFont(new Font("Tahoma", Font.BOLD, 13)); 85 | t5.setForeground(new Color(50, 205, 50)); 86 | t5.setColumns(10); 87 | t5.setBounds(277, 225, 139, 20); 88 | contentPane.add(t5); 89 | 90 | b1 = new JButton("Search"); 91 | b1.addActionListener(this); 92 | b1.setFont(new Font("Tahoma", Font.BOLD, 12)); 93 | b1.setBounds(428, 83, 80, 29); 94 | b1.setBackground(Color.BLACK); 95 | b1.setForeground(Color.WHITE); 96 | contentPane.add(b1); 97 | 98 | b2 = new JButton("Retrieve"); 99 | b2.addActionListener(this); 100 | b2.setFont(new Font("Tahoma", Font.BOLD, 12)); 101 | b2.setBounds(426, 188, 85, 29); 102 | b2.setBackground(Color.BLACK); 103 | b2.setForeground(Color.WHITE); 104 | contentPane.add(b2); 105 | 106 | b3 = new JButton("Back"); 107 | b3.addActionListener(this); 108 | b3.setFont(new Font("Tahoma", Font.BOLD, 13)); 109 | b3.setBounds(233, 270, 101, 29); 110 | b3.setBackground(Color.BLACK); 111 | b3.setForeground(Color.WHITE); 112 | contentPane.add(b3); 113 | 114 | JPanel panel = new JPanel(); 115 | panel.setBorder(new TitledBorder(new LineBorder(new Color(139, 69, 19), 2), "Forgot-Panel", 116 | TitledBorder.LEADING, TitledBorder.TOP, null, new Color(178, 34, 34))); 117 | panel.setBounds(47, 45, 508, 281); 118 | panel.setBackground(Color.WHITE); 119 | contentPane.add(panel); 120 | } 121 | 122 | public void actionPerformed(ActionEvent ae){ 123 | try{ 124 | conn con = new conn(); 125 | if(ae.getSource() == b1){ 126 | String sql = "select * from account where username=?"; 127 | PreparedStatement st = con.c.prepareStatement(sql); 128 | 129 | st.setString(1, t1.getText()); 130 | ResultSet rs = st.executeQuery(); 131 | 132 | while (rs.next()) { 133 | t2.setText(rs.getString("name")); 134 | t3.setText(rs.getString("sec_q")); 135 | } 136 | 137 | } 138 | if(ae.getSource() == b2){ 139 | String sql = "select * from account where sec_ans=?"; 140 | PreparedStatement st = con.c.prepareStatement(sql); 141 | 142 | st.setString(1, t4.getText()); 143 | ResultSet rs = st.executeQuery(); 144 | 145 | while (rs.next()) { 146 | t5.setText(rs.getString("password")); 147 | } 148 | 149 | } 150 | if(ae.getSource() == b3){ 151 | this.setVisible(false); 152 | new Login_user().setVisible(true); 153 | 154 | } 155 | }catch(Exception e){ 156 | 157 | } 158 | } 159 | 160 | } 161 | -------------------------------------------------------------------------------- /src/Home.java: -------------------------------------------------------------------------------- 1 | 2 | import javax.swing.*; 3 | import javax.swing.border.*; 4 | import java.awt.*; 5 | import java.awt.event.*; 6 | 7 | public class Home extends JFrame implements ActionListener{ 8 | 9 | private JPanel contentPane; 10 | private JButton b1,b2,b3,b4,b5,b6; 11 | 12 | public static void main(String[] args) { 13 | new Home().setVisible(true); 14 | } 15 | 16 | public Home() { 17 | super("Library Management System"); 18 | setBounds(400, 150, 1000, 800); 19 | contentPane = new JPanel(); 20 | setContentPane(contentPane); 21 | contentPane.setLayout(null); 22 | 23 | 24 | JMenuBar menuBar = new JMenuBar(); 25 | menuBar.add(Box.createRigidArea(new Dimension(400,100))); 26 | menuBar.setBorder(new EtchedBorder(EtchedBorder.LOWERED, new Color(0, 128, 0), new Color(128, 128, 128))); 27 | menuBar.setBackground(Color.white); 28 | menuBar.setBounds(0, 10, 1000, 40); 29 | contentPane.add(menuBar); 30 | 31 | JMenu mnExit = new JMenu("Exit"); 32 | mnExit.setFont(new Font("Trebuchet MS", Font.BOLD, 17)); 33 | 34 | 35 | JMenuItem mntmLogout = new JMenuItem("Logout"); 36 | mntmLogout.setBackground(Color.white); 37 | mntmLogout.setForeground(Color.red); 38 | mntmLogout.addActionListener(this); 39 | mnExit.add(mntmLogout); 40 | 41 | JMenuItem mntmExit = new JMenuItem("Exit"); 42 | mntmExit.setForeground(Color.red); 43 | mntmExit.setBackground(Color.white); 44 | mntmExit.addActionListener(this); 45 | mnExit.add(mntmExit); 46 | 47 | 48 | 49 | JMenu mnHelp = new JMenu("Help"); 50 | mnHelp.setFont(new Font("Trebuchet MS", Font.BOLD, 17)); 51 | 52 | 53 | JMenuItem mntmReadme = new JMenuItem("Read Me"); 54 | mntmReadme.setBackground(Color.white); 55 | mntmReadme.setForeground(Color.red); 56 | mnHelp.add(mntmReadme); 57 | 58 | JMenuItem mntmAboutUs = new JMenuItem("About Us"); 59 | mntmAboutUs.setForeground(Color.red); 60 | mntmAboutUs.setBackground(Color.white); 61 | mntmAboutUs.addActionListener(this); 62 | mnHelp.add(mntmAboutUs); 63 | 64 | JMenu mnRecord = new JMenu("Record"); 65 | mnRecord.setFont(new Font("Trebuchet MS", Font.BOLD, 17)); 66 | 67 | 68 | JMenuItem bookdetails = new JMenuItem("Book Details"); 69 | bookdetails.addActionListener(this); 70 | bookdetails.setBackground(Color.white); 71 | bookdetails.setForeground(Color.red); 72 | mnRecord.add(bookdetails); 73 | 74 | JMenuItem studentdetails = new JMenuItem("Student Details"); 75 | studentdetails.setBackground(Color.white); 76 | studentdetails.setForeground(Color.red); 77 | studentdetails.addActionListener(this); 78 | mnRecord.add(studentdetails); 79 | 80 | menuBar.add(mnRecord); 81 | menuBar.add(mnHelp); 82 | menuBar.add(mnExit); 83 | 84 | 85 | JLabel l1 = new JLabel("Library Management System"); 86 | l1.setForeground(new Color(204, 51, 102)); 87 | l1.setFont(new Font("Segoe UI Semilight", Font.BOLD, 30)); 88 | l1.setBounds(268, 30, 701, 80); 89 | contentPane.add(l1); 90 | 91 | JLabel l2 = new JLabel(""); 92 | l2.setVerticalAlignment(SwingConstants.TOP); 93 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("icons/addbooks.png")); 94 | Image i2 = i1.getImage().getScaledInstance(150, 150,Image.SCALE_DEFAULT); 95 | ImageIcon i3 = new ImageIcon(i2); 96 | l2 = new JLabel(i3); 97 | l2.setBounds(60, 140, 159, 152); 98 | contentPane.add(l2); 99 | 100 | JLabel l3 = new JLabel(""); 101 | ImageIcon i4 = new ImageIcon(ClassLoader.getSystemResource("icons/stats.png")); 102 | Image i5 = i4.getImage().getScaledInstance(200, 200,Image.SCALE_DEFAULT); 103 | ImageIcon i6 = new ImageIcon(i5); 104 | l3 = new JLabel(i6); 105 | l3.setBounds(300, 160, 134, 128); 106 | contentPane.add(l3); 107 | 108 | JLabel l4 = new JLabel(""); 109 | ImageIcon i7 = new ImageIcon(ClassLoader.getSystemResource("icons/addstudent.png")); 110 | Image i8 = i7.getImage().getScaledInstance(150, 150,Image.SCALE_DEFAULT); 111 | ImageIcon i9 = new ImageIcon(i8); 112 | l4 = new JLabel(i9); 113 | l4.setBounds(530, 140, 225, 152); 114 | contentPane.add(l4); 115 | 116 | b1 = new JButton("Add Books"); 117 | b1.addActionListener(this); 118 | b1.setBackground(Color.BLACK); 119 | b1.setForeground(Color.WHITE); 120 | b1.setBounds(60, 320, 159, 44); 121 | contentPane.add(b1); 122 | 123 | b2 = new JButton("Statistics"); 124 | b2.addActionListener(this); 125 | b2.setBackground(Color.BLACK); 126 | b2.setForeground(Color.WHITE); 127 | b2.setBounds(313, 320, 139, 44); 128 | contentPane.add(b2); 129 | 130 | b3 = new JButton("Add Student"); 131 | b3.addActionListener(this); 132 | b3.setBackground(Color.BLACK); 133 | b3.setForeground(Color.WHITE); 134 | b3.setBounds(562, 320, 167, 44); 135 | contentPane.add(b3); 136 | 137 | JPanel panel = new JPanel(); 138 | panel.setBorder(new TitledBorder(new LineBorder(new Color(250, 128, 114), 2), "Operation", TitledBorder.LEADING, 139 | TitledBorder.TOP, null, new Color(220, 20, 60))); 140 | panel.setBounds(20, 120, 750, 260); 141 | panel.setBackground(Color.WHITE); 142 | contentPane.add(panel); 143 | 144 | b4 = new JButton("Issue Book"); 145 | b4.addActionListener(this); 146 | b4.setBackground(Color.BLACK); 147 | b4.setForeground(Color.WHITE); 148 | b4.setBounds(76, 620, 143, 41); 149 | contentPane.add(b4); 150 | 151 | b5 = new JButton("Return Book"); 152 | b5.addActionListener(this); 153 | b5.setBackground(Color.BLACK); 154 | b5.setForeground(Color.WHITE); 155 | b5.setBounds(310, 620, 159, 41); 156 | contentPane.add(b5); 157 | 158 | b6 = new JButton("About Us"); 159 | b6.addActionListener(this); 160 | b6.setBackground(Color.BLACK); 161 | b6.setForeground(Color.WHITE); 162 | b6.setBounds(562, 620, 159, 41); 163 | contentPane.add(b6); 164 | 165 | JLabel l5 = new JLabel(""); 166 | ImageIcon i10 = new ImageIcon(ClassLoader.getSystemResource("icons/issue.png")); 167 | Image i11 = i10.getImage().getScaledInstance(150, 150,Image.SCALE_DEFAULT); 168 | ImageIcon i12 = new ImageIcon(i11); 169 | l5 = new JLabel(i12); 170 | l5.setBounds(60, 440, 159, 163); 171 | contentPane.add(l5); 172 | 173 | JLabel l6 = new JLabel(""); 174 | ImageIcon i13 = new ImageIcon(ClassLoader.getSystemResource("icons/return.png")); 175 | Image i14 = i13.getImage().getScaledInstance(150, 150,Image.SCALE_DEFAULT); 176 | ImageIcon i15 = new ImageIcon(i14); 177 | l6 = new JLabel(i15); 178 | l6.setBounds(332, 440, 139, 152); 179 | contentPane.add(l6); 180 | 181 | JLabel l7 = new JLabel(""); 182 | ImageIcon i16 = new ImageIcon(ClassLoader.getSystemResource("icons/about.png")); 183 | Image i17 = i16.getImage().getScaledInstance(150, 150,Image.SCALE_DEFAULT); 184 | ImageIcon i18 = new ImageIcon(i17); 185 | l7 = new JLabel(i18); 186 | l7.setBounds(562, 440, 157, 152); 187 | contentPane.add(l7); 188 | 189 | JPanel panel2 = new JPanel(); 190 | panel2.setBorder(new TitledBorder(new LineBorder(new Color(205, 133, 63), 2), "Action", TitledBorder.LEADING, 191 | TitledBorder.TOP, null, new Color(233, 150, 122))); 192 | panel2.setBounds(20, 420, 750, 270); 193 | panel2.setBackground(Color.WHITE); 194 | contentPane.add(panel2); 195 | 196 | getContentPane().setBackground(Color.WHITE); 197 | contentPane.setBackground(Color.WHITE); 198 | } 199 | 200 | 201 | public void actionPerformed(ActionEvent ae){ 202 | String msg = ae.getActionCommand(); 203 | if(msg.equals("Logout")){ 204 | setVisible(false); 205 | new Login_user().setVisible(true); 206 | }else if(msg.equals("Exit")){ 207 | System.exit(ABORT); 208 | 209 | }else if(msg.equals("Read Me")){ 210 | 211 | }else if(msg.equals("About Us")){ 212 | setVisible(false); 213 | new aboutUs().setVisible(true); 214 | 215 | }else if(msg.equals("Book Details")){ 216 | setVisible(false); 217 | new BookDetails().setVisible(true); 218 | }else if(msg.equals("Student Details")){ 219 | setVisible(false); 220 | new StudentDetails().setVisible(true); 221 | 222 | } 223 | 224 | if(ae.getSource() == b1){ 225 | this.setVisible(false); 226 | new AddBook().setVisible(true); 227 | } 228 | if(ae.getSource() == b2){ 229 | this.setVisible(false); 230 | new Statistics().setVisible(true); 231 | } 232 | if(ae.getSource() == b3){ 233 | this.setVisible(false); 234 | new AddStudent().setVisible(true); 235 | } 236 | if(ae.getSource() == b4){ 237 | this.setVisible(false); 238 | new IssueBook().setVisible(true); 239 | } 240 | if(ae.getSource() == b5){ 241 | this.setVisible(false); 242 | new ReturnBook().setVisible(true); 243 | 244 | } 245 | if(ae.getSource() == b6){ 246 | this.setVisible(false); 247 | new aboutUs().setVisible(true); 248 | 249 | } 250 | 251 | } 252 | } 253 | -------------------------------------------------------------------------------- /src/IssueBook.java: -------------------------------------------------------------------------------- 1 | 2 | import java.awt.*; 3 | import javax.swing.*; 4 | import javax.swing.border.*; 5 | import com.toedter.calendar.JDateChooser; 6 | import java.awt.event.*; 7 | import java.sql.*; 8 | 9 | public class IssueBook extends JFrame implements ActionListener{ 10 | 11 | private JPanel contentPane; 12 | JDateChooser dateChooser; 13 | private JTextField t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14; 14 | private JButton b1,b2,b3,b4; 15 | 16 | public static void main(String[] args) { 17 | new IssueBook().setVisible(true); 18 | 19 | } 20 | 21 | public IssueBook() { 22 | setBounds(300, 200, 900, 500); 23 | contentPane = new JPanel(); 24 | contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); 25 | setContentPane(contentPane); 26 | contentPane.setBackground(Color.WHITE); 27 | contentPane.setLayout(null); 28 | 29 | JLabel l1 = new JLabel("Book_id"); 30 | l1.setFont(new Font("Tahoma", Font.BOLD, 14)); 31 | l1.setForeground(new Color(47, 79, 79)); 32 | l1.setBounds(47, 63, 100, 23); 33 | contentPane.add(l1); 34 | 35 | JLabel l2 = new JLabel("Name"); 36 | l2.setForeground(new Color(47, 79, 79)); 37 | l2.setFont(new Font("Tahoma", Font.BOLD, 14)); 38 | l2.setBounds(47, 97, 100, 23); 39 | contentPane.add(l2); 40 | 41 | JLabel l3 = new JLabel("ISBN"); 42 | l3.setForeground(new Color(47, 79, 79)); 43 | l3.setFont(new Font("Tahoma", Font.BOLD, 14)); 44 | l3.setBounds(47, 131, 100, 23); 45 | contentPane.add(l3); 46 | 47 | JLabel l4 = new JLabel("Publisher"); 48 | l4.setForeground(new Color(47, 79, 79)); 49 | l4.setFont(new Font("Tahoma", Font.BOLD, 14)); 50 | l4.setBounds(47, 165, 100, 23); 51 | contentPane.add(l4); 52 | 53 | JLabel l5 = new JLabel("Edition"); 54 | l5.setForeground(new Color(47, 79, 79)); 55 | l5.setFont(new Font("Tahoma", Font.BOLD, 14)); 56 | l5.setBounds(47, 199, 100, 23); 57 | contentPane.add(l5); 58 | 59 | JLabel l6 = new JLabel("Price"); 60 | l6.setForeground(new Color(47, 79, 79)); 61 | l6.setFont(new Font("Tahoma", Font.BOLD, 14)); 62 | l6.setBounds(47, 233, 100, 23); 63 | contentPane.add(l6); 64 | 65 | JLabel l7 = new JLabel("Pages"); 66 | l7.setForeground(new Color(47, 79, 79)); 67 | l7.setFont(new Font("Tahoma", Font.BOLD, 14)); 68 | l7.setBounds(47, 267, 100, 23); 69 | contentPane.add(l7); 70 | 71 | t1 = new JTextField(); 72 | t1.setForeground(new Color(47, 79, 79)); 73 | t1.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 74 | t1.setBounds(126, 66, 86, 20); 75 | contentPane.add(t1); 76 | 77 | b1 = new JButton("Search"); 78 | b1.addActionListener(this); 79 | b1.setBorder(new LineBorder(new Color(192, 192, 192), 1, true)); 80 | b1.setBackground(Color.BLACK); 81 | b1.setForeground(Color.WHITE); 82 | b1.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 83 | b1.setBounds(234, 59, 100, 30); 84 | 85 | contentPane.add(b1); 86 | 87 | t2 = new JTextField(); 88 | t2.setEditable(false); 89 | t2.setForeground(new Color(47, 79, 79)); 90 | t2.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 91 | t2.setBounds(126, 100, 208, 20); 92 | contentPane.add(t2); 93 | t2.setColumns(10); 94 | 95 | t3 = new JTextField(); 96 | t3.setEditable(false); 97 | t3.setForeground(new Color(47, 79, 79)); 98 | t3.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 99 | t3.setColumns(10); 100 | t3.setBounds(126, 131, 208, 20); 101 | contentPane.add(t3); 102 | 103 | t4 = new JTextField(); 104 | t4.setEditable(false); 105 | t4.setForeground(new Color(47, 79, 79)); 106 | t4.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 107 | t4.setColumns(10); 108 | t4.setBounds(126, 168, 208, 20); 109 | contentPane.add(t4); 110 | 111 | t5 = new JTextField(); 112 | t5.setEditable(false); 113 | t5.setForeground(new Color(47, 79, 79)); 114 | t5.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 115 | t5.setColumns(10); 116 | t5.setBounds(126, 202, 208, 20); 117 | contentPane.add(t5); 118 | 119 | t6 = new JTextField(); 120 | t6.setEditable(false); 121 | t6.setForeground(new Color(47, 79, 79)); 122 | t6.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 123 | t6.setColumns(10); 124 | t6.setBounds(126, 236, 208, 20); 125 | contentPane.add(t6); 126 | 127 | t7 = new JTextField(); 128 | t7.setEditable(false); 129 | t7.setForeground(new Color(47, 79, 79)); 130 | t7.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 131 | t7.setColumns(10); 132 | t7.setBounds(126, 270, 208, 20); 133 | contentPane.add(t7); 134 | 135 | JPanel panel = new JPanel(); 136 | panel.setBorder(new TitledBorder(new LineBorder(new Color(47, 79, 79), 2, true), "Issue-Book", 137 | TitledBorder.LEADING, TitledBorder.TOP, null, new Color(34, 139, 34))); 138 | panel.setFont(new Font("Tahoma", Font.BOLD, 14)); 139 | panel.setBounds(10, 38, 345, 288); 140 | panel.setBackground(Color.WHITE); 141 | contentPane.add(panel); 142 | 143 | JLabel l8 = new JLabel("Student_id"); 144 | l8.setForeground(new Color(47, 79, 79)); 145 | l8.setFont(new Font("Tahoma", Font.BOLD, 14)); 146 | l8.setBounds(384, 63, 100, 23); 147 | contentPane.add(l8); 148 | 149 | JLabel l9 = new JLabel("Name"); 150 | l9.setForeground(new Color(47, 79, 79)); 151 | l9.setFont(new Font("Tahoma", Font.BOLD, 14)); 152 | l9.setBounds(384, 103, 100, 23); 153 | contentPane.add(l9); 154 | 155 | JLabel l10 = new JLabel("Father's Name"); 156 | l10.setForeground(new Color(47, 79, 79)); 157 | l10.setFont(new Font("Tahoma", Font.BOLD, 14)); 158 | l10.setBounds(384, 147, 100, 23); 159 | contentPane.add(l10); 160 | 161 | JLabel l11 = new JLabel("Course"); 162 | l11.setForeground(new Color(47, 79, 79)); 163 | l11.setFont(new Font("Tahoma", Font.BOLD, 14)); 164 | l11.setBounds(384, 187, 100, 23); 165 | contentPane.add(l11); 166 | 167 | JLabel l12 = new JLabel("Branch"); 168 | l12.setForeground(new Color(47, 79, 79)); 169 | l12.setFont(new Font("Tahoma", Font.BOLD, 14)); 170 | l12.setBounds(384, 233, 100, 23); 171 | contentPane.add(l12); 172 | 173 | JLabel l13 = new JLabel("Year"); 174 | l13.setForeground(new Color(47, 79, 79)); 175 | l13.setFont(new Font("Tahoma", Font.BOLD, 14)); 176 | l13.setBounds(384, 284, 100, 23); 177 | contentPane.add(l13); 178 | 179 | JLabel l14 = new JLabel("Semester"); 180 | l14.setForeground(new Color(47, 79, 79)); 181 | l14.setFont(new Font("Tahoma", Font.BOLD, 14)); 182 | l14.setBounds(384, 336, 100, 23); 183 | contentPane.add(l14); 184 | 185 | t8 = new JTextField(); 186 | t8.setForeground(new Color(47, 79, 79)); 187 | t8.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 188 | t8.setColumns(10); 189 | t8.setBounds(508, 66, 86, 20); 190 | contentPane.add(t8); 191 | 192 | b2 = new JButton("Search"); 193 | b2.addActionListener(this); 194 | b2.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 195 | b2.setBorder(new LineBorder(new Color(192, 192, 192), 1, true)); 196 | b2.setBounds(604, 59, 100, 30); 197 | b2.setBackground(Color.BLACK); 198 | b2.setForeground(Color.WHITE); 199 | contentPane.add(b2); 200 | 201 | t9 = new JTextField(); 202 | t9.setForeground(new Color(47, 79, 79)); 203 | t9.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 204 | t9.setEditable(false); 205 | t9.setColumns(10); 206 | t9.setBounds(508, 106, 208, 20); 207 | contentPane.add(t9); 208 | 209 | t10 = new JTextField(); 210 | t10.setForeground(new Color(47, 79, 79)); 211 | t10.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 212 | t10.setEditable(false); 213 | t10.setColumns(10); 214 | t10.setBounds(508, 150, 208, 20); 215 | contentPane.add(t10); 216 | 217 | t11 = new JTextField(); 218 | t11.setForeground(new Color(47, 79, 79)); 219 | t11.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 220 | t11.setEditable(false); 221 | t11.setColumns(10); 222 | t11.setBounds(508, 190, 208, 20); 223 | contentPane.add(t11); 224 | 225 | t12 = new JTextField(); 226 | t12.setForeground(new Color(47, 79, 79)); 227 | t12.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 228 | t12.setEditable(false); 229 | t12.setColumns(10); 230 | t12.setBounds(508, 236, 208, 20); 231 | contentPane.add(t12); 232 | 233 | t13 = new JTextField(); 234 | t13.setForeground(new Color(47, 79, 79)); 235 | t13.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 236 | t13.setEditable(false); 237 | t13.setColumns(10); 238 | t13.setBounds(508, 286, 208, 20); 239 | contentPane.add(t13); 240 | 241 | t14 = new JTextField(); 242 | t14.setForeground(new Color(47, 79, 79)); 243 | t14.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 244 | t14.setEditable(false); 245 | t14.setColumns(10); 246 | t14.setBounds(508, 338, 208, 20); 247 | contentPane.add(t14); 248 | 249 | JPanel panel_1 = new JPanel(); 250 | panel_1.setBorder(new TitledBorder(new LineBorder(new Color(70, 130, 180), 2, true), "Student-Deatails", 251 | TitledBorder.LEADING, TitledBorder.TOP, null, new Color(100, 149, 237))); 252 | panel_1.setForeground(new Color(0, 100, 0)); 253 | panel_1.setBounds(360, 38, 378, 372); 254 | panel_1.setBackground(Color.WHITE); 255 | contentPane.add(panel_1); 256 | 257 | JLabel l15 = new JLabel(" Date of Issue :"); 258 | l15.setForeground(new Color(105, 105, 105)); 259 | l15.setFont(new Font("Trebuchet MS", Font.BOLD, 15)); 260 | l15.setBounds(20, 340, 118, 26); 261 | contentPane.add(l15); 262 | 263 | dateChooser = new JDateChooser(); 264 | dateChooser.setBorder(new LineBorder(new Color(0, 0, 0), 1, true)); 265 | dateChooser.setForeground(new Color(105, 105, 105)); 266 | dateChooser.setBounds(137, 337, 200, 29); 267 | contentPane.add(dateChooser); 268 | 269 | b3 = new JButton("Issue"); 270 | b3.addActionListener(this); 271 | b3.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 272 | b3.setBorder(new LineBorder(new Color(192, 192, 192), 1, true)); 273 | b3.setBounds(47, 377, 118, 33); 274 | b3.setBackground(Color.BLACK); 275 | b3.setForeground(Color.WHITE); 276 | contentPane.add(b3); 277 | 278 | b4 = new JButton("Back"); 279 | b4.addActionListener(this); 280 | b4.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 281 | b4.setBorder(new LineBorder(new Color(192, 192, 192), 1, true)); 282 | b4.setBounds(199, 377, 100, 33); 283 | b4.setBackground(Color.BLACK); 284 | b4.setForeground(Color.WHITE); 285 | contentPane.add(b4); 286 | } 287 | 288 | public void actionPerformed(ActionEvent ae){ 289 | try{ 290 | conn con = new conn(); 291 | if(ae.getSource() == b1){ 292 | String sql = "select * from book where book_id = ?"; 293 | PreparedStatement st = con.c.prepareStatement(sql); 294 | st.setString(1, t1.getText()); 295 | ResultSet rs = st.executeQuery(); 296 | 297 | while (rs.next()) { 298 | t2.setText(rs.getString("name")); 299 | t3.setText(rs.getString("isbn")); 300 | t4.setText(rs.getString("publisher")); 301 | t5.setText(rs.getString("edition")); 302 | t6.setText(rs.getString("price")); 303 | t7.setText(rs.getString("pages")); 304 | } 305 | st.close(); 306 | rs.close(); 307 | 308 | } 309 | if(ae.getSource() == b2){ 310 | String sql = "select * from student where student_id = ?"; 311 | PreparedStatement st = con.c.prepareStatement(sql); 312 | st.setString(1, t8.getText()); 313 | ResultSet rs = st.executeQuery(); 314 | 315 | while (rs.next()) { 316 | t9.setText(rs.getString("name")); 317 | t10.setText(rs.getString("father")); 318 | t11.setText(rs.getString("course")); 319 | t12.setText(rs.getString("branch")); 320 | t13.setText(rs.getString("year")); 321 | t14.setText(rs.getString("semester")); 322 | } 323 | st.close(); 324 | rs.close(); 325 | 326 | } 327 | if(ae.getSource() == b3){ 328 | try{ 329 | String sql = "insert into issueBook(book_id, student_id, bname, sname, course, branch, dateOfIssue) values(?, ?, ?, ?, ?, ?, ?)"; 330 | PreparedStatement st = con.c.prepareStatement(sql); 331 | st.setString(1, t1.getText()); 332 | st.setString(2, t8.getText()); 333 | st.setString(3, t2.getText()); 334 | st.setString(4, t9.getText()); 335 | st.setString(5, t11.getText()); 336 | st.setString(6, t12.getText()); 337 | st.setString(7, ((JTextField) dateChooser.getDateEditor().getUiComponent()).getText()); 338 | int i = st.executeUpdate(); 339 | if (i > 0) 340 | JOptionPane.showMessageDialog(null, "Successfully Book Issued..!"); 341 | else 342 | JOptionPane.showMessageDialog(null, "error"); 343 | }catch(Exception e){ 344 | e.printStackTrace(); 345 | } 346 | } 347 | if(ae.getSource() == b4){ 348 | this.setVisible(false); 349 | new Home().setVisible(true); 350 | 351 | } 352 | 353 | con.c.close(); 354 | }catch(Exception e){ 355 | 356 | } 357 | } 358 | } 359 | -------------------------------------------------------------------------------- /src/Jar/jcalendar-tz-1.3.3-4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/src/Jar/jcalendar-tz-1.3.3-4.jar -------------------------------------------------------------------------------- /src/Jar/rs2xml.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/src/Jar/rs2xml.jar -------------------------------------------------------------------------------- /src/LibraryManagementSystem.java: -------------------------------------------------------------------------------- 1 | 2 | 3 | import java.awt.*; 4 | import javax.swing.*; 5 | import java.awt.event.*; 6 | 7 | public class LibraryManagementSystem extends JFrame implements ActionListener{ 8 | 9 | JLabel l1; 10 | JButton b1; 11 | 12 | public LibraryManagementSystem() { 13 | 14 | setSize(1366,390); 15 | setLayout(null); 16 | setLocation(300,300); 17 | 18 | l1 = new JLabel(""); 19 | b1 = new JButton("Next"); 20 | 21 | b1.setBackground(Color.WHITE); 22 | b1.setForeground(Color.BLACK); 23 | 24 | 25 | 26 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("library/management/system/icons/first.jpg")); 27 | Image i3 = i1.getImage().getScaledInstance(1366, 390,Image.SCALE_DEFAULT); 28 | ImageIcon i2 = new ImageIcon(i3); 29 | l1 = new JLabel(i2); 30 | 31 | b1.setBounds(1050,250,200,60); 32 | l1.setBounds(0, 0, 1366, 390); 33 | 34 | l1.add(b1); 35 | add(l1); 36 | 37 | b1.addActionListener(this); 38 | } 39 | 40 | public void actionPerformed(ActionEvent ae){ 41 | new Login_user().setVisible(true); 42 | this.setVisible(false); 43 | 44 | } 45 | 46 | public static void main(String[] args) { 47 | LibraryManagementSystem window = new LibraryManagementSystem(); 48 | window.setVisible(true); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Loading.java: -------------------------------------------------------------------------------- 1 | 2 | 3 | import java.awt.*; 4 | import javax.swing.*; 5 | import java.awt.event.*; 6 | import java.sql.*; 7 | 8 | public class Loading extends JFrame implements Runnable { 9 | 10 | private JPanel contentPane; 11 | private JProgressBar progressBar; 12 | Connection conn; 13 | int s; 14 | Thread th; 15 | 16 | public static void main(String[] args) { 17 | new Loading().setVisible(true); 18 | } 19 | 20 | public void setUploading() { 21 | setVisible(false); 22 | th.start(); 23 | } 24 | 25 | public void run() { 26 | try { 27 | for (int i = 0; i < 200; i++) { 28 | s = s + 1; 29 | int m = progressBar.getMaximum(); 30 | int v = progressBar.getValue(); 31 | if (v < m) { 32 | progressBar.setValue(progressBar.getValue() + 1); 33 | } else { 34 | i = 201; 35 | setVisible(false); 36 | new Home().setVisible(true); 37 | } 38 | Thread.sleep(60); 39 | } 40 | } catch (Exception e) { 41 | e.printStackTrace(); 42 | } 43 | } 44 | 45 | public Loading() { 46 | 47 | super("Loading"); 48 | th = new Thread((Runnable) this); 49 | 50 | setBounds(600, 300, 1000, 800); 51 | contentPane = new JPanel(); 52 | setContentPane(contentPane); 53 | contentPane.setLayout(null); 54 | 55 | JLabel lbllibraryManagement = new JLabel("Library Management System (Think&Build)"); 56 | lbllibraryManagement.setForeground(new Color(72, 209, 204)); 57 | lbllibraryManagement.setFont(new Font("Trebuchet MS", Font.BOLD, 35)); 58 | lbllibraryManagement.setBounds(50, 6, 1000, 35); 59 | contentPane.add(lbllibraryManagement); 60 | 61 | progressBar = new JProgressBar(); 62 | progressBar.setFont(new Font("Tahoma", Font.BOLD, 12)); 63 | progressBar.setStringPainted(true); 64 | progressBar.setBounds(130, 135, 300, 25); 65 | contentPane.add(progressBar); 66 | 67 | JLabel lblNewLabel_2 = new JLabel("Please Wait...."); 68 | lblNewLabel_2.setFont(new Font("Yu Gothic UI Semibold", Font.BOLD, 20)); 69 | lblNewLabel_2.setForeground(new Color(160, 82, 45)); 70 | lblNewLabel_2.setBounds(200, 165, 150, 20); 71 | contentPane.add(lblNewLabel_2); 72 | 73 | JPanel panel = new JPanel(); 74 | panel.setBackground(Color.WHITE); 75 | //panel.setBounds(0, 0, 590, 390); 76 | contentPane.add(panel); 77 | 78 | setUploading(); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/Login_user.java: -------------------------------------------------------------------------------- 1 | 2 | 3 | import java.awt.*; 4 | import javax.swing.*; 5 | import java.awt.event.*; 6 | import java.sql.*; 7 | 8 | public class Login_user extends JFrame implements ActionListener{ 9 | 10 | private JPanel panel; 11 | private JTextField textField; 12 | private JPasswordField passwordField; 13 | private JButton b1,b2,b3; 14 | 15 | 16 | public Login_user() { 17 | super("Login/SignUp"); 18 | 19 | //Color class --> Swing 20 | //background --> Jframe 21 | setBackground(Color.ORANGE); 22 | setBounds(600, 300, 600, 400); 23 | 24 | panel = new JPanel(); 25 | panel.setBackground(Color.gray); 26 | setContentPane(panel); 27 | panel.setLayout(null); 28 | 29 | JLabel l = new JLabel(new ImageIcon(ClassLoader.getSystemResource("icons/logo.png"))); 30 | l.setBounds(300, 10, 400, 300); 31 | panel.add(l); 32 | 33 | 34 | 35 | 36 | 37 | 38 | JLabel l1 = new JLabel("Username --> "); 39 | l1.setBounds(124, 89, 95, 24); 40 | l1.setForeground(Color.black); 41 | panel.add(l1); 42 | 43 | JLabel l2 = new JLabel("Password --> "); 44 | l2.setBounds(124, 124, 95, 24); 45 | l2.setForeground(Color.black); 46 | panel.add(l2); 47 | 48 | textField = new JTextField(); 49 | textField.setBounds(210, 93, 157, 20); 50 | panel.add(textField); 51 | 52 | passwordField = new JPasswordField(); 53 | passwordField.setBounds(210, 128, 157, 20); 54 | panel.add(passwordField); 55 | 56 | JLabel l3 = new JLabel(""); 57 | l3.setBounds(377, 79, 46, 34); 58 | panel.add(l3); 59 | 60 | JLabel l4 = new JLabel(""); 61 | l4.setBounds(377, 124, 46, 34); 62 | panel.add(l3); 63 | 64 | b1 = new JButton("Login"); 65 | b1.addActionListener(this); 66 | 67 | b1.setForeground(Color.black); 68 | b1.setBackground(Color.green); 69 | b1.setBounds(149, 181, 113, 39); 70 | panel.add(b1); 71 | 72 | b2 = new JButton("SignUp"); 73 | b2.addActionListener(this); 74 | 75 | b2.setForeground(Color.black); 76 | b2.setBackground(Color.CYAN); 77 | b2.setBounds(289, 181, 113, 39); 78 | panel.add(b2); 79 | 80 | b3 = new JButton("Forgot Password"); 81 | b3.addActionListener(this); 82 | 83 | b3.setForeground(Color.black); 84 | b3.setBackground(Color.red); 85 | b3.setBounds(199, 231, 179, 39); 86 | panel.add(b3); 87 | 88 | 89 | 90 | // JPanel panel2 = new JPanel(); 91 | // panel2.setBackground(Color.YELLOW); 92 | // panel2.setBounds(24, 40, 434, 263); 93 | // panel.add(panel2); 94 | } 95 | 96 | public void actionPerformed(ActionEvent ae){ 97 | if(ae.getSource() == b1){ 98 | Boolean status = false; 99 | try { 100 | conn con = new conn(); 101 | String sql = "select * from account where username=? and password=?"; 102 | PreparedStatement st = con.c.prepareStatement(sql); 103 | 104 | st.setString(1, textField.getText()); 105 | st.setString(2, passwordField.getText()); 106 | 107 | ResultSet rs = st.executeQuery(); 108 | if (rs.next()) { 109 | this.setVisible(false); 110 | new Home().setVisible(true); 111 | } else 112 | JOptionPane.showMessageDialog(null, "Invalid Login...!."); 113 | 114 | } catch (Exception e2) { 115 | e2.printStackTrace(); 116 | } 117 | } 118 | if(ae.getSource() == b2){ 119 | setVisible(false); 120 | Signup su = new Signup(); 121 | su.setVisible(true); 122 | } 123 | if(ae.getSource() == b3){ 124 | setVisible(false); 125 | Forgot forgot = new Forgot(); 126 | forgot.setVisible(true); 127 | } 128 | } 129 | 130 | public static void main(String[] args) { 131 | new Login_user().setVisible(true); 132 | } 133 | 134 | } 135 | -------------------------------------------------------------------------------- /src/ReturnBook.java: -------------------------------------------------------------------------------- 1 | 2 | 3 | import javax.swing.*; 4 | import javax.swing.border.*; 5 | import java.awt.*; 6 | import com.toedter.calendar.JDateChooser; 7 | import java.awt.event.*; 8 | import java.sql.*; 9 | 10 | public class ReturnBook extends JFrame implements ActionListener{ 11 | 12 | private JPanel contentPane; 13 | private JTextField textField; 14 | private JTextField textField_1; 15 | private JTextField textField_2; 16 | private JTextField textField_3; 17 | private JTextField textField_4; 18 | private JTextField textField_5; 19 | private JTextField textField_6; 20 | private JButton b1,b2,b3; 21 | private JDateChooser dateChooser; 22 | 23 | public static void main(String[] args) { 24 | new ReturnBook().setVisible(true); 25 | } 26 | 27 | public void delete() { 28 | try { 29 | conn con = new conn(); 30 | String sql = "delete from issueBook where book_id=?"; 31 | PreparedStatement st = con.c.prepareStatement(sql); 32 | st.setString(1, textField.getText()); 33 | int i = st.executeUpdate(); 34 | if (i > 0) 35 | JOptionPane.showConfirmDialog(null, "Book Returned"); 36 | else 37 | JOptionPane.showMessageDialog(null, "error in Deleting"); 38 | } catch (SQLException e) { 39 | JOptionPane.showMessageDialog(null, e); 40 | e.printStackTrace(); 41 | } 42 | } 43 | 44 | 45 | public ReturnBook() { 46 | setBounds(450, 300, 617, 363); 47 | contentPane = new JPanel(); 48 | contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); 49 | setContentPane(contentPane); 50 | contentPane.setBackground(Color.WHITE); 51 | contentPane.setLayout(null); 52 | 53 | JLabel lblNewLabel = new JLabel("Book_id"); 54 | lblNewLabel.setForeground(new Color(0, 0, 0)); 55 | lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 14)); 56 | lblNewLabel.setBounds(52, 52, 87, 24); 57 | contentPane.add(lblNewLabel); 58 | 59 | JLabel lblStudentid = new JLabel("Student_id"); 60 | lblStudentid.setForeground(Color.BLACK); 61 | lblStudentid.setFont(new Font("Tahoma", Font.BOLD, 14)); 62 | lblStudentid.setBounds(243, 52, 87, 24); 63 | contentPane.add(lblStudentid); 64 | 65 | JLabel lblBook = new JLabel("Book"); 66 | lblBook.setForeground(Color.BLACK); 67 | lblBook.setFont(new Font("Tahoma", Font.BOLD, 14)); 68 | lblBook.setBounds(52, 98, 71, 24); 69 | contentPane.add(lblBook); 70 | 71 | JLabel lblName = new JLabel("Name"); 72 | lblName.setForeground(Color.BLACK); 73 | lblName.setFont(new Font("Tahoma", Font.BOLD, 14)); 74 | lblName.setBounds(300, 98, 71, 24); 75 | contentPane.add(lblName); 76 | 77 | JLabel lblCourse = new JLabel("Course"); 78 | lblCourse.setForeground(Color.BLACK); 79 | lblCourse.setFont(new Font("Tahoma", Font.BOLD, 14)); 80 | lblCourse.setBounds(52, 143, 87, 24); 81 | contentPane.add(lblCourse); 82 | 83 | JLabel lblBranch = new JLabel("Branch"); 84 | lblBranch.setForeground(Color.BLACK); 85 | lblBranch.setFont(new Font("Tahoma", Font.BOLD, 14)); 86 | lblBranch.setBounds(303, 144, 68, 24); 87 | contentPane.add(lblBranch); 88 | 89 | JLabel lblDateOfIssue = new JLabel("Date of Issue"); 90 | lblDateOfIssue.setForeground(Color.BLACK); 91 | lblDateOfIssue.setFont(new Font("Tahoma", Font.BOLD, 14)); 92 | lblDateOfIssue.setBounds(52, 188, 105, 29); 93 | contentPane.add(lblDateOfIssue); 94 | 95 | JLabel lblDateOfReturn = new JLabel("Date of Return"); 96 | lblDateOfReturn.setForeground(Color.BLACK); 97 | lblDateOfReturn.setFont(new Font("Tahoma", Font.BOLD, 14)); 98 | lblDateOfReturn.setBounds(52, 234, 118, 29); 99 | contentPane.add(lblDateOfReturn); 100 | 101 | textField = new JTextField(); 102 | textField.setForeground(new Color(105, 105, 105)); 103 | textField.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 104 | textField.setBounds(128, 56, 105, 20); 105 | contentPane.add(textField); 106 | textField.setColumns(10); 107 | 108 | textField_1 = new JTextField(); 109 | textField_1.setForeground(new Color(105, 105, 105)); 110 | textField_1.setFont(new Font("Trebuchet MS", Font.BOLD, 14)); 111 | textField_1.setBounds(340, 56, 93, 20); 112 | contentPane.add(textField_1); 113 | textField_1.setColumns(10); 114 | 115 | b1 = new JButton("Search"); 116 | b1.addActionListener(this); 117 | b1.setBounds(443, 52, 105, 29); 118 | b1.setBackground(Color.BLACK); 119 | b1.setForeground(Color.WHITE); 120 | contentPane.add(b1); 121 | 122 | textField_2 = new JTextField(); 123 | textField_2.setEditable(false); 124 | textField_2.setForeground(new Color(0, 100, 0)); 125 | textField_2.setFont(new Font("Trebuchet MS", Font.BOLD, 13)); 126 | textField_2.setBounds(128, 102, 162, 20); 127 | contentPane.add(textField_2); 128 | textField_2.setColumns(10); 129 | 130 | textField_3 = new JTextField(); 131 | textField_3.setEditable(false); 132 | textField_3.setForeground(new Color(0, 100, 0)); 133 | textField_3.setFont(new Font("Trebuchet MS", Font.BOLD, 13)); 134 | textField_3.setColumns(10); 135 | textField_3.setBounds(369, 102, 179, 20); 136 | contentPane.add(textField_3); 137 | 138 | textField_4 = new JTextField(); 139 | textField_4.setEditable(false); 140 | textField_4.setForeground(new Color(0, 100, 0)); 141 | textField_4.setFont(new Font("Trebuchet MS", Font.BOLD, 13)); 142 | textField_4.setColumns(10); 143 | textField_4.setBounds(128, 147, 162, 20); 144 | contentPane.add(textField_4); 145 | 146 | textField_5 = new JTextField(); 147 | textField_5.setForeground(new Color(0, 100, 0)); 148 | textField_5.setFont(new Font("Trebuchet MS", Font.BOLD, 13)); 149 | textField_5.setEditable(false); 150 | textField_5.setColumns(10); 151 | textField_5.setBounds(369, 147, 179, 20); 152 | contentPane.add(textField_5); 153 | 154 | textField_6 = new JTextField(); 155 | textField_6.setForeground(new Color(0, 100, 0)); 156 | textField_6.setFont(new Font("Trebuchet MS", Font.BOLD, 13)); 157 | textField_6.setEditable(false); 158 | textField_6.setColumns(10); 159 | textField_6.setBounds(167, 194, 162, 20); 160 | contentPane.add(textField_6); 161 | 162 | dateChooser = new JDateChooser(); 163 | dateChooser.setBorder(new LineBorder(new Color(0, 0, 0), 0, true)); 164 | dateChooser.setBounds(167, 234, 172, 29); 165 | contentPane.add(dateChooser); 166 | 167 | b2 = new JButton("Return"); 168 | b2.addActionListener(this); 169 | b2.setFont(new Font("Trebuchet MS", Font.BOLD, 15)); 170 | b2.setBorder(new LineBorder(new Color(0, 0, 0), 0, true)); 171 | b2.setBounds(369, 179, 149, 30); 172 | b2.setBackground(Color.BLACK); 173 | b2.setForeground(Color.WHITE); 174 | 175 | contentPane.add(b2); 176 | 177 | b3 = new JButton("Back"); 178 | b3.addActionListener(this); 179 | b3.setFont(new Font("Trebuchet MS", Font.BOLD, 15)); 180 | b3.setBorder(new LineBorder(new Color(0, 0, 0), 0, true)); 181 | b3.setBounds(369, 231, 149, 30); 182 | b3.setBackground(Color.BLACK); 183 | b3.setForeground(Color.WHITE); 184 | contentPane.add(b3); 185 | 186 | JPanel panel = new JPanel(); 187 | panel.setBorder(new TitledBorder(new LineBorder(new Color(255, 69, 0), 2, true), "Return-Panel", 188 | TitledBorder.LEADING, TitledBorder.TOP, null, new Color(220, 20, 60))); 189 | panel.setBounds(10, 24, 569, 269); 190 | panel.setBackground(Color.WHITE); 191 | contentPane.add(panel); 192 | } 193 | 194 | public void actionPerformed(ActionEvent ae){ 195 | try{ 196 | conn con = new conn(); 197 | if(ae.getSource() == b1){ 198 | String sql = "select * from issueBook where student_id = ? and book_id =?"; 199 | PreparedStatement st = con.c.prepareStatement(sql); 200 | st.setString(1, textField_1.getText()); 201 | st.setString(2, textField.getText()); 202 | ResultSet rs = st.executeQuery(); 203 | 204 | while (rs.next()) { 205 | textField_2.setText(rs.getString("bname")); 206 | textField_3.setText(rs.getString("sname")); 207 | textField_4.setText(rs.getString("course")); 208 | textField_5.setText(rs.getString("branch")); 209 | textField_6.setText(rs.getString("dateOfIssue")); 210 | } 211 | st.close(); 212 | rs.close(); 213 | 214 | } 215 | if(ae.getSource() == b2){ 216 | String sql = "insert into returnBook(book_id, student_id, bname, sname,course, branch, dateOfIssue, dateOfReturn) values(?, ?, ?, ?, ?, ?, ?, ?)"; 217 | PreparedStatement st = con.c.prepareStatement(sql); 218 | st.setString(1, textField.getText()); 219 | st.setString(2, textField_1.getText()); 220 | st.setString(3, textField_2.getText()); 221 | st.setString(4, textField_3.getText()); 222 | st.setString(5, textField_4.getText()); 223 | st.setString(6, textField_5.getText()); 224 | st.setString(7, textField_6.getText()); 225 | 226 | st.setString(8, ((JTextField) dateChooser.getDateEditor().getUiComponent()).getText()); 227 | int i = st.executeUpdate(); 228 | if (i > 0) { 229 | JOptionPane.showMessageDialog(null, "Processing.."); 230 | delete(); 231 | } else 232 | JOptionPane.showMessageDialog(null, "error"); 233 | 234 | } 235 | if(ae.getSource() == b3){ 236 | this.setVisible(false); 237 | new Home().setVisible(true); 238 | 239 | } 240 | }catch(Exception e){ 241 | 242 | } 243 | } 244 | } 245 | -------------------------------------------------------------------------------- /src/Signup.java: -------------------------------------------------------------------------------- 1 | 2 | 3 | import java.awt.*; 4 | import javax.swing.*; 5 | import java.sql.*; 6 | import java.awt.event.*; 7 | import javax.swing.border.*; 8 | 9 | public class Signup extends JFrame implements ActionListener{ 10 | 11 | private JPanel contentPane; 12 | private JTextField textField; 13 | private JTextField textField_1; 14 | private JTextField textField_2; 15 | private JTextField textField_3; 16 | private JButton b1, b2; 17 | private JComboBox comboBox; 18 | 19 | 20 | public static void main(String[] args) { 21 | new Signup().setVisible(true); 22 | } 23 | 24 | public Signup() { 25 | setBounds(600, 250, 606, 406); 26 | contentPane = new JPanel(); 27 | contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); 28 | setContentPane(contentPane); 29 | contentPane.setBackground(Color.WHITE); 30 | contentPane.setLayout(null); 31 | 32 | JLabel lblUsername = new JLabel("Username :"); 33 | lblUsername.setForeground(Color.DARK_GRAY); 34 | lblUsername.setFont(new Font("Tahoma", Font.BOLD, 14)); 35 | lblUsername.setBounds(99, 86, 92, 26); 36 | contentPane.add(lblUsername); 37 | 38 | JLabel lblName = new JLabel("Name :"); 39 | lblName.setForeground(Color.DARK_GRAY); 40 | lblName.setFont(new Font("Tahoma", Font.BOLD, 14)); 41 | lblName.setBounds(99, 123, 92, 26); 42 | contentPane.add(lblName); 43 | 44 | JLabel lblPassword = new JLabel("Password :"); 45 | lblPassword.setForeground(Color.DARK_GRAY); 46 | lblPassword.setFont(new Font("Tahoma", Font.BOLD, 14)); 47 | lblPassword.setBounds(99, 160, 92, 26); 48 | contentPane.add(lblPassword); 49 | 50 | JLabel lblAnswer = new JLabel("Answer :"); 51 | lblAnswer.setForeground(Color.DARK_GRAY); 52 | lblAnswer.setFont(new Font("Tahoma", Font.BOLD, 14)); 53 | lblAnswer.setBounds(99, 234, 92, 26); 54 | contentPane.add(lblAnswer); 55 | 56 | comboBox = new JComboBox(); 57 | comboBox.setModel(new DefaultComboBoxModel(new String[] { "Your NickName?", "Your Lucky Number?", 58 | "Your child SuperHero?", "Your childhood Name ?" })); 59 | comboBox.setBounds(265, 202, 148, 20); 60 | contentPane.add(comboBox); 61 | 62 | JLabel lblSecurityQuestion = new JLabel("Security Question :"); 63 | lblSecurityQuestion.setForeground(Color.DARK_GRAY); 64 | lblSecurityQuestion.setFont(new Font("Tahoma", Font.BOLD, 14)); 65 | lblSecurityQuestion.setBounds(99, 197, 140, 26); 66 | contentPane.add(lblSecurityQuestion); 67 | 68 | textField = new JTextField(); 69 | textField.setBounds(265, 91, 148, 20); 70 | contentPane.add(textField); 71 | textField.setColumns(10); 72 | 73 | textField_1 = new JTextField(); 74 | textField_1.setColumns(10); 75 | textField_1.setBounds(265, 128, 148, 20); 76 | contentPane.add(textField_1); 77 | 78 | textField_2 = new JTextField(); 79 | textField_2.setColumns(10); 80 | textField_2.setBounds(265, 165, 148, 20); 81 | contentPane.add(textField_2); 82 | 83 | textField_3 = new JTextField(); 84 | textField_3.setColumns(10); 85 | textField_3.setBounds(265, 239, 148, 20); 86 | contentPane.add(textField_3); 87 | 88 | b1 = new JButton("Create"); 89 | b1.addActionListener(this); 90 | b1.setFont(new Font("Tahoma", Font.BOLD, 13)); 91 | b1.setBounds(140, 289, 100, 30); 92 | b1.setBackground(Color.BLACK); 93 | b1.setForeground(Color.WHITE); 94 | contentPane.add(b1); 95 | 96 | b2 = new JButton("Back"); 97 | b2.addActionListener(this); 98 | b2.setFont(new Font("Tahoma", Font.BOLD, 13)); 99 | b2.setBounds(300, 289, 100, 30); 100 | b2.setBackground(Color.BLACK); 101 | b2.setForeground(Color.WHITE); 102 | contentPane.add(b2); 103 | 104 | JPanel panel = new JPanel(); 105 | panel.setForeground(new Color(34, 139, 34)); 106 | panel.setBorder(new TitledBorder(new LineBorder(new Color(128, 128, 0), 2), "Create-Account", 107 | TitledBorder.LEADING, TitledBorder.TOP, null, new Color(34, 139, 34))); 108 | panel.setBounds(31, 46, 476, 296); 109 | panel.setBackground(Color.WHITE); 110 | contentPane.add(panel); 111 | } 112 | 113 | public void actionPerformed(ActionEvent ae){ 114 | try{ 115 | conn con = new conn(); 116 | 117 | if(ae.getSource() == b1){ 118 | String sql = "insert into account(username, name, password, sec_q, sec_ans) values(?, ?, ?, ?, ?)"; 119 | PreparedStatement st = con.c.prepareStatement(sql); 120 | 121 | st.setString(1, textField.getText()); 122 | st.setString(2, textField_1.getText()); 123 | st.setString(3, textField_2.getText()); 124 | st.setString(4, (String) comboBox.getSelectedItem()); 125 | st.setString(5, textField_3.getText()); 126 | 127 | int i = st.executeUpdate(); 128 | if (i > 0){ 129 | JOptionPane.showMessageDialog(null, "successfully Created"); 130 | } 131 | 132 | textField.setText(""); 133 | textField_1.setText(""); 134 | textField_2.setText(""); 135 | textField_3.setText(""); 136 | } 137 | if(ae.getSource() == b2){ 138 | this.setVisible(false); 139 | new Login_user().setVisible(true); 140 | 141 | } 142 | }catch(Exception e){ 143 | 144 | } 145 | } 146 | } 147 | 148 | -------------------------------------------------------------------------------- /src/Statistics.java: -------------------------------------------------------------------------------- 1 | 2 | import java.awt.*; 3 | import java.sql.*; 4 | import javax.swing.*; 5 | import javax.swing.border.*; 6 | import net.proteanit.sql.DbUtils; 7 | import java.awt.event.*; 8 | 9 | public class Statistics extends JFrame{ 10 | 11 | private JPanel contentPane; 12 | private JTable table; 13 | private JTable table_1; 14 | 15 | public static void main(String[] args) { 16 | new Statistics().setVisible(true); 17 | } 18 | 19 | public void issueBook() { 20 | try { 21 | conn con = new conn(); 22 | String sql = "select * from issueBook"; 23 | PreparedStatement st = con.c.prepareStatement(sql); 24 | ResultSet rs = st.executeQuery(); 25 | 26 | table.setModel(DbUtils.resultSetToTableModel(rs)); 27 | 28 | } catch (Exception e) { 29 | // TODO: handle exception 30 | } 31 | } 32 | 33 | public void returnBook() { 34 | try { 35 | conn con = new conn(); 36 | String sql = "select * from returnBook"; 37 | PreparedStatement st = con.c.prepareStatement(sql); 38 | ResultSet rs = st.executeQuery(); 39 | table_1.setModel(DbUtils.resultSetToTableModel(rs)); 40 | } catch (Exception e) { 41 | // TODO: handle exception 42 | } 43 | } 44 | 45 | public Statistics() { 46 | setBounds(400, 200, 810, 594); 47 | contentPane = new JPanel(); 48 | contentPane.setBackground(Color.WHITE); 49 | contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); 50 | setContentPane(contentPane); 51 | contentPane.setLayout(null); 52 | 53 | JScrollPane scrollPane = new JScrollPane(); 54 | scrollPane.setBounds(40, 51, 708, 217); 55 | contentPane.add(scrollPane); 56 | 57 | table = new JTable(); 58 | table.setBackground(new Color(224, 255, 255)); 59 | table.setForeground(new Color(128, 128, 0)); 60 | table.setFont(new Font("Trebuchet MS", Font.BOLD, 15)); 61 | scrollPane.setViewportView(table); 62 | 63 | JPanel panel = new JPanel(); 64 | panel.setBorder(new TitledBorder(new LineBorder(new Color(47, 79, 79), 2, true), "Issue-Book-Details", 65 | TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 128, 128))); 66 | panel.setForeground(new Color(0, 128, 128)); 67 | panel.setBounds(26, 36, 737, 240); 68 | panel.setBackground(Color.WHITE); 69 | contentPane.add(panel); 70 | 71 | JLabel l1 = new JLabel("Back"); 72 | l1.addMouseListener(new MouseAdapter() { 73 | @Override 74 | public void mouseClicked(MouseEvent arg0) { 75 | setVisible(false); 76 | Home home = new Home(); 77 | home.setVisible(true); 78 | } 79 | }); 80 | l1.setForeground(new Color(204, 0, 102)); 81 | l1.setFont(new Font("Tahoma", Font.BOLD, 18)); 82 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("icons/tenth.png")); 83 | Image i2 = i1.getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT); 84 | ImageIcon i3 = new ImageIcon(i2); 85 | l1.setIcon(i3); 86 | l1.setBounds(690, 13, 96, 27); 87 | contentPane.add(l1); 88 | 89 | JScrollPane scrollPane_1 = new JScrollPane(); 90 | scrollPane_1.setBounds(40, 316, 717, 217); 91 | contentPane.add(scrollPane_1); 92 | 93 | table_1 = new JTable(); 94 | table_1.setBackground(new Color(204, 255, 255)); 95 | table_1.setForeground(new Color(153, 51, 0)); 96 | table_1.setFont(new Font("Sitka Small", Font.BOLD, 12)); 97 | scrollPane_1.setViewportView(table_1); 98 | 99 | JPanel panel_1 = new JPanel(); 100 | panel_1.setBorder(new TitledBorder(new LineBorder(new Color(0, 204, 153), 2, true), "Return-Book-Details", 101 | TitledBorder.RIGHT, TitledBorder.TOP, null, new Color(0, 102, 51))); 102 | panel_1.setBounds(22, 299, 741, 240); 103 | panel_1.setBackground(Color.WHITE); 104 | contentPane.add(panel_1); 105 | 106 | 107 | issueBook(); 108 | returnBook(); 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /src/StudentDetails.java: -------------------------------------------------------------------------------- 1 | 2 | 3 | import java.awt.*; 4 | import java.awt.event.*; 5 | import java.sql.*; 6 | import javax.swing.*; 7 | import javax.swing.border.*; 8 | import net.proteanit.sql.DbUtils; 9 | 10 | public class StudentDetails extends JFrame implements ActionListener{ 11 | 12 | private JPanel contentPane; 13 | private JTable table; 14 | private JTextField search; 15 | private JButton b1,b2; 16 | 17 | public static void main(String[] args) { 18 | new StudentDetails().setVisible(true); 19 | } 20 | 21 | public void student() { 22 | try { 23 | conn con = new conn(); 24 | String sql = "select * from student"; 25 | PreparedStatement st = con.c.prepareStatement(sql); 26 | ResultSet rs = st.executeQuery(); 27 | 28 | table.setModel(DbUtils.resultSetToTableModel(rs)); 29 | rs.close(); 30 | st.close(); 31 | con.c.close(); 32 | } catch (Exception e) { 33 | 34 | } 35 | } 36 | 37 | public StudentDetails() { 38 | setBounds(350, 200, 890, 475); 39 | contentPane = new JPanel(); 40 | contentPane.setBackground(new Color(220, 220, 220)); 41 | contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); 42 | setContentPane(contentPane); 43 | contentPane.setBackground(Color.WHITE); 44 | contentPane.setLayout(null); 45 | 46 | JScrollPane scrollPane = new JScrollPane(); 47 | scrollPane.setBounds(79, 133, 771, 288); 48 | contentPane.add(scrollPane); 49 | 50 | table = new JTable(); 51 | table.addMouseListener(new MouseAdapter() { 52 | @Override 53 | public void mouseClicked(MouseEvent arg0) { 54 | int row = table.getSelectedRow(); 55 | search.setText(table.getModel().getValueAt(row, 1).toString()); 56 | } 57 | }); 58 | table.setBackground(new Color(240, 248, 255)); 59 | table.setForeground(Color.DARK_GRAY); 60 | table.setFont(new Font("Trebuchet MS", Font.BOLD, 16)); 61 | scrollPane.setViewportView(table); 62 | 63 | JButton b1 = new JButton("Search"); 64 | b1.addActionListener(this); 65 | b1.setBorder(new LineBorder(new Color(255, 20, 147), 2, true)); 66 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("library/management/system/icons/eight.png")); 67 | Image i2 = i1.getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT); 68 | ImageIcon i3 = new ImageIcon(i2); 69 | b1.setIcon(i3); 70 | b1.setForeground(new Color(199, 21, 133)); 71 | b1.setFont(new Font("Trebuchet MS", Font.BOLD, 18)); 72 | b1.setBounds(564, 89, 138, 33); 73 | contentPane.add(b1); 74 | 75 | JButton b2 = new JButton("Delete"); 76 | b2.addActionListener(this); 77 | ImageIcon i4 = new ImageIcon(ClassLoader.getSystemResource("library/management/system/icons/nineth.png")); 78 | Image i5 = i4.getImage().getScaledInstance(30, 30, Image.SCALE_DEFAULT); 79 | ImageIcon i6 = new ImageIcon(i5); 80 | b2.setIcon(i6); 81 | b2.setForeground(new Color(199, 21, 133)); 82 | b2.setFont(new Font("Trebuchet MS", Font.BOLD, 18)); 83 | b2.setBorder(new LineBorder(new Color(255, 20, 147), 2, true)); 84 | b2.setBounds(712, 89, 138, 33); 85 | contentPane.add(b2); 86 | 87 | JLabel l1 = new JLabel("Student Details"); 88 | l1.setForeground(new Color(102, 205, 170)); 89 | l1.setFont(new Font("Trebuchet MS", Font.BOLD | Font.ITALIC, 26)); 90 | l1.setBounds(250, 20, 400, 47); 91 | contentPane.add(l1); 92 | 93 | 94 | search = new JTextField(); 95 | search.setBackground(new Color(255, 240, 245)); 96 | search.setBorder(new LineBorder(new Color(255, 105, 180), 2, true)); 97 | search.setForeground(new Color(47, 79, 79)); 98 | search.setFont(new Font("Trebuchet MS", Font.BOLD | Font.ITALIC, 17)); 99 | search.setBounds(189, 89, 357, 33); 100 | contentPane.add(search); 101 | search.setColumns(10); 102 | 103 | JLabel l2 = new JLabel("Back"); 104 | l2.addMouseListener(new MouseAdapter() { 105 | @Override 106 | public void mouseClicked(MouseEvent e) { 107 | setVisible(false); 108 | Home home = new Home(); 109 | home.setVisible(true); 110 | } 111 | }); 112 | l2.setForeground(Color.GRAY); 113 | l2.setFont(new Font("Trebuchet MS", Font.BOLD, 18)); 114 | ImageIcon i7 = new ImageIcon(ClassLoader.getSystemResource("library/management/system/icons/tenth.png")); 115 | Image i8 = i7.getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT); 116 | ImageIcon i9 = new ImageIcon(i8); 117 | l2.setIcon(i9); 118 | l2.setBounds(97, 89, 72, 33); 119 | contentPane.add(l2); 120 | 121 | JPanel panel = new JPanel(); 122 | panel.setBorder(new TitledBorder(new LineBorder(new Color(95, 158, 160), 3, true), "Student-Deatails", 123 | TitledBorder.LEADING, TitledBorder.TOP, null, new Color(72, 209, 204))); 124 | panel.setBounds(68, 59, 790, 370); 125 | panel.setBackground(Color.WHITE); 126 | contentPane.add(panel); 127 | 128 | student(); 129 | } 130 | 131 | public void actionPerformed(ActionEvent ae){ 132 | try{ 133 | 134 | conn con = new conn(); 135 | if( ae.getSource() == b1){ 136 | String sql = "select * from student where concat(name, student_id) like ?"; 137 | PreparedStatement st = con.c.prepareStatement(sql); 138 | st.setString(1, "%" + search.getText() + "%"); 139 | ResultSet rs = st.executeQuery(); 140 | 141 | table.setModel(DbUtils.resultSetToTableModel(rs)); 142 | rs.close(); 143 | st.close(); 144 | } 145 | 146 | if(ae.getSource() == b2){ 147 | String sql = "delete from student where name = '" + search.getText() + "'"; 148 | PreparedStatement st = con.c.prepareStatement(sql); 149 | 150 | JDialog.setDefaultLookAndFeelDecorated(true); 151 | int response = JOptionPane.showConfirmDialog(null, "Do you want to continue?", "Confirm", 152 | JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); 153 | if (response == JOptionPane.NO_OPTION) { 154 | 155 | } else if (response == JOptionPane.YES_OPTION) { 156 | int rs = st.executeUpdate(); 157 | JOptionPane.showMessageDialog(null, "Deleted !!"); 158 | } else if (response == JOptionPane.CLOSED_OPTION) { 159 | 160 | } 161 | st.close(); 162 | 163 | } 164 | con.c.close(); 165 | }catch(Exception e){ 166 | 167 | } 168 | } 169 | } 170 | -------------------------------------------------------------------------------- /src/conn.java: -------------------------------------------------------------------------------- 1 | import java.sql.*; 2 | 3 | public class conn{ 4 | Connection c; 5 | Statement s; 6 | public conn(){ 7 | try{ 8 | Class.forName("com.mysql.jdbc.Driver"); 9 | c =DriverManager.getConnection("jdbc:mysql:///project2","root",""); 10 | s =c.createStatement(); 11 | 12 | 13 | 14 | }catch(Exception e){ 15 | System.out.println(e); 16 | } 17 | } 18 | public static void main(String args[]) 19 | { 20 | new conn(); 21 | System.out.println("Database Connected"); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/icons/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/src/icons/about.png -------------------------------------------------------------------------------- /src/icons/addbooks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/src/icons/addbooks.png -------------------------------------------------------------------------------- /src/icons/addstudent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/src/icons/addstudent.png -------------------------------------------------------------------------------- /src/icons/admin.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/src/icons/admin.JPG -------------------------------------------------------------------------------- /src/icons/eight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/src/icons/eight.png -------------------------------------------------------------------------------- /src/icons/fifth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/src/icons/fifth.png -------------------------------------------------------------------------------- /src/icons/first.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/src/icons/first.jpg -------------------------------------------------------------------------------- /src/icons/issue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/src/icons/issue.png -------------------------------------------------------------------------------- /src/icons/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/src/icons/logo.png -------------------------------------------------------------------------------- /src/icons/logo_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/src/icons/logo_1.png -------------------------------------------------------------------------------- /src/icons/nineth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/src/icons/nineth.png -------------------------------------------------------------------------------- /src/icons/return.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/src/icons/return.png -------------------------------------------------------------------------------- /src/icons/seventh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/src/icons/seventh.png -------------------------------------------------------------------------------- /src/icons/sixth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/src/icons/sixth.png -------------------------------------------------------------------------------- /src/icons/stats.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/src/icons/stats.png -------------------------------------------------------------------------------- /src/icons/tenth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gmonu/Library-Management-System/31be43dceae2c9b7b0392bd984b66b015ad441c5/src/icons/tenth.png --------------------------------------------------------------------------------