diff --git a/.env b/.env new file mode 100644 index 0000000..d7c3d4d --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +export SQLUSERNAME='root' +export SQLPASSWORD='nilesh@8101998' diff --git a/.gitignore b/.gitignore index 68fa45d..13c73a6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -/nbproject/private/ -/build/ \ No newline at end of file +build/* +nbproject/* diff --git a/HospitalDB.sql b/HospitalDB.sql new file mode 100644 index 0000000..9ca3af2 --- /dev/null +++ b/HospitalDB.sql @@ -0,0 +1,148 @@ +-- MySQL dump 10.13 Distrib 8.0.12, for Win64 (x86_64) +-- +-- Host: localhost Database: hospital +-- ------------------------------------------------------ +-- Server version 8.0.12 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; + SET NAMES utf8 ; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `doctor` +-- + +DROP TABLE IF EXISTS `doctor`; +/*!40101 SET @saved_cs_client = @@character_set_client */; + SET character_set_client = utf8mb4 ; +CREATE TABLE `doctor` ( + `DoctorID` int(10) NOT NULL, + `DoctorName` varchar(20) DEFAULT NULL, + `FatherName` varchar(20) DEFAULT NULL, + `Email` varchar(50) DEFAULT NULL, + `ContactNo` bigint(20) DEFAULT NULL, + `Qualifications` varchar(50) DEFAULT NULL, + `Gender` varchar(1) DEFAULT 'M', + `BloodGroup` varchar(5) DEFAULT 'O+', + `DateOfJoining` date DEFAULT NULL, + `Address` varchar(100) DEFAULT NULL, + PRIMARY KEY (`DoctorID`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `doctor` +-- + +LOCK TABLES `doctor` WRITE; +/*!40000 ALTER TABLE `doctor` DISABLE KEYS */; +INSERT INTO `doctor` VALUES (1,'Mihir Wachasunder','Nachiket Wachasunder','mihir123@gmail.com',9404235687,'BAMS','M','O+','2019-09-09','karad'),(2,'Nachiket Wachasunder','Vasant Wachasunder','nachiket12@gmail.com',9874563210,'MD','M','O+','2019-09-11','Karad'),(3,'Neha Wachsunder','Nachiket Wachasunder','neha123@rediffmail.com',9786541230,'MD','F','O+','2019-09-11','Karad'),(5,'askldj alksdj','asssadm','as@abjsd',7539846210,'MBBS','M','A+','2019-09-20','adsh bkasjb'); +/*!40000 ALTER TABLE `doctor` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `medicine` +-- + +DROP TABLE IF EXISTS `medicine`; +/*!40101 SET @saved_cs_client = @@character_set_client */; + SET character_set_client = utf8mb4 ; +CREATE TABLE `medicine` ( + `Name` varchar(100) DEFAULT NULL, + `Qty` int(11) DEFAULT NULL, + `BatchNo` int(11) DEFAULT NULL, + `MRP` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `medicine` +-- + +LOCK TABLES `medicine` WRITE; +/*!40000 ALTER TABLE `medicine` DISABLE KEYS */; +INSERT INTO `medicine` VALUES ('abc',0,1111,100),('xyz',9,2111,50),('pqr',16,3111,560),('lmn',17,4111,490),('gulvel',0,5111,90); +/*!40000 ALTER TABLE `medicine` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `patientreg` +-- + +DROP TABLE IF EXISTS `patientreg`; +/*!40101 SET @saved_cs_client = @@character_set_client */; + SET character_set_client = utf8mb4 ; +CREATE TABLE `patientreg` ( + `PatientID` int(10) NOT NULL, + `PatientName` varchar(20) DEFAULT NULL, + `FathersName` varchar(20) DEFAULT NULL, + `Email` varchar(50) DEFAULT NULL, + `ContactNo` bigint(20) DEFAULT NULL, + `Age` int(2) DEFAULT NULL, + `Remarks` varchar(100) DEFAULT NULL, + `Gender` varchar(1) DEFAULT NULL, + `BG` varchar(3) DEFAULT NULL, + `Doctor` varchar(25) DEFAULT NULL, + `Address` varchar(80) DEFAULT NULL, + `State` varchar(30) DEFAULT NULL, + `City` varchar(25) DEFAULT NULL, + PRIMARY KEY (`PatientID`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `patientreg` +-- + +LOCK TABLES `patientreg` WRITE; +/*!40000 ALTER TABLE `patientreg` DISABLE KEYS */; +INSERT INTO `patientreg` VALUES (1,'Dattaraj','Sanjay','dattaraj898@gmail.com',9049425095,21,'NA','M','O+','Dr. Nachiket','Katraj','Maharashtra','Pune'),(2,'hasvdh','sakj','nas@ajs',7894526130,21,'asd','M','A+','Dr. Mihir','ajsdb','Maharashtra','Kolhapur'),(3,'Nilesh','Sanjay','nil@gmail.com',9456873210,56,'NA','M','A+','Dr. Mihir','Pune','Maharashtra','Pune'),(4,'Sukrut','Anand','sukrut1@gmail.com',9654781230,54,'NA','M','A+','Dr. Mihir','Karad','Maharashtra','Karad'),(5,'Shreeram','Ramesh','ram@gmail.com',9852361470,25,'Scars all over the body','M','A+','Dr. Mihir','Pune','Maharashtra','Pune'),(16,'aksjdh','asjh','asdn@kasj',7539514620,22,'ssdfsdg','F','A+','Dr. Mihir','asssaDD','Maharashtra','Pune'),(18,'asydf','hdaisud','adsg@sdjg',1234567890,21,'NA','M','A+','Dr. Mihir','ajsgda asdj','Maharashtra','Pune'); +/*!40000 ALTER TABLE `patientreg` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `registrations` +-- + +DROP TABLE IF EXISTS `registrations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; + SET character_set_client = utf8mb4 ; +CREATE TABLE `registrations` ( + `name` varchar(20) DEFAULT NULL, + `user_name` varchar(20) DEFAULT NULL, + `password` varchar(20) NOT NULL, + `email_id` varchar(50) DEFAULT NULL, + `contact_no` bigint(20) NOT NULL, + `sec_que` varchar(50) DEFAULT NULL, + `sec_ans` varchar(25) DEFAULT NULL, + PRIMARY KEY (`contact_no`,`password`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `registrations` +-- + +LOCK TABLES `registrations` WRITE; +/*!40000 ALTER TABLE `registrations` DISABLE KEYS */; +INSERT INTO `registrations` VALUES ('shreeram','shree','shree123','shreeramk.1998@gmail.com',1,'Hospital\'s foundation year?','9552951410'),('Nilesh','Nil','nilesh','n.suryawanshi1168@gmail.com',9503293405,'Hospital\'s foundation year?','1990'); +/*!40000 ALTER TABLE `registrations` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2019-09-22 16:20:26 diff --git a/README.md b/README.md index 78d5d5c..4d260d8 100644 --- a/README.md +++ b/README.md @@ -1 +1,14 @@ # First Deployment +Setting Environment Variables in Linux + +## Use Bash + $ export USER='yoursqlusername' + $ export PASSWORD='yoursqlpassword' + $ echo $USER + $ yoursqlusername + $ echo $PASSWORD + $ yoursqlpassword + +## Take a look at this +[Autoenv](https://github.com/inishchith/autoenv.git) +Do go through readme and follow the steps. Makes work easy with env variables diff --git a/bugs.txt b/bugs.txt new file mode 100644 index 0000000..2a02ea7 --- /dev/null +++ b/bugs.txt @@ -0,0 +1,5 @@ +update password in registration table use cascadings +General ward with bed number in Patient Admit +Update save btn to discharge in Discharge form +update query to show only admitted patients in discharge form +After billing do not show patient in any of the tables; diff --git a/build/classes/.netbeans_automatic_build b/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/build/classes/.netbeans_update_resources b/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/build/classes/com/sdtssp/DBConnect.class b/build/classes/com/sdtssp/DBConnect.class new file mode 100644 index 0000000..d9ace4f Binary files /dev/null and b/build/classes/com/sdtssp/DBConnect.class differ diff --git a/build/classes/com/sdtssp/Pharmacy$1.class b/build/classes/com/sdtssp/Pharmacy$1.class new file mode 100644 index 0000000..30e52e2 Binary files /dev/null and b/build/classes/com/sdtssp/Pharmacy$1.class differ diff --git a/build/classes/com/sdtssp/Pharmacy.class b/build/classes/com/sdtssp/Pharmacy.class new file mode 100644 index 0000000..248674b Binary files /dev/null and b/build/classes/com/sdtssp/Pharmacy.class differ diff --git a/build/classes/com/sdtssp/SortedComboBoxModel.class b/build/classes/com/sdtssp/SortedComboBoxModel.class new file mode 100644 index 0000000..c8dc6c9 Binary files /dev/null and b/build/classes/com/sdtssp/SortedComboBoxModel.class differ diff --git a/build/classes/com/sdtssp/Validators.class b/build/classes/com/sdtssp/Validators.class new file mode 100644 index 0000000..871af8f Binary files /dev/null and b/build/classes/com/sdtssp/Validators.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Billing$1.class b/build/classes/com/sdtssp/hospitalUI/Billing$1.class new file mode 100644 index 0000000..ba53bdb Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Billing$1.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Billing.class b/build/classes/com/sdtssp/hospitalUI/Billing.class new file mode 100644 index 0000000..a5e38cd Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Billing.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Billing.form b/build/classes/com/sdtssp/hospitalUI/Billing.form new file mode 100644 index 0000000..249b61c --- /dev/null +++ b/build/classes/com/sdtssp/hospitalUI/Billing.form @@ -0,0 +1,85 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/build/classes/com/sdtssp/hospitalUI/ForgotPwd$1.class b/build/classes/com/sdtssp/hospitalUI/ForgotPwd$1.class new file mode 100644 index 0000000..e879c10 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/ForgotPwd$1.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/ForgotPwd$2.class b/build/classes/com/sdtssp/hospitalUI/ForgotPwd$2.class new file mode 100644 index 0000000..59999f2 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/ForgotPwd$2.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/ForgotPwd$3.class b/build/classes/com/sdtssp/hospitalUI/ForgotPwd$3.class new file mode 100644 index 0000000..d974b74 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/ForgotPwd$3.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/ForgotPwd.class b/build/classes/com/sdtssp/hospitalUI/ForgotPwd.class new file mode 100644 index 0000000..27eff10 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/ForgotPwd.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/ForgotPwd.form b/build/classes/com/sdtssp/hospitalUI/ForgotPwd.form new file mode 100644 index 0000000..0d26e1c --- /dev/null +++ b/build/classes/com/sdtssp/hospitalUI/ForgotPwd.form @@ -0,0 +1,238 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/classes/com/sdtssp/hospitalUI/LoginPharmcy$1.class b/build/classes/com/sdtssp/hospitalUI/LoginPharmcy$1.class new file mode 100644 index 0000000..0e40c58 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/LoginPharmcy$1.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/LoginPharmcy$2.class b/build/classes/com/sdtssp/hospitalUI/LoginPharmcy$2.class new file mode 100644 index 0000000..700dbc0 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/LoginPharmcy$2.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/LoginPharmcy$3.class b/build/classes/com/sdtssp/hospitalUI/LoginPharmcy$3.class new file mode 100644 index 0000000..dd80469 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/LoginPharmcy$3.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/LoginPharmcy$4.class b/build/classes/com/sdtssp/hospitalUI/LoginPharmcy$4.class new file mode 100644 index 0000000..ee64844 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/LoginPharmcy$4.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/LoginPharmcy$5.class b/build/classes/com/sdtssp/hospitalUI/LoginPharmcy$5.class new file mode 100644 index 0000000..645fb80 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/LoginPharmcy$5.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/LoginPharmcy$6.class b/build/classes/com/sdtssp/hospitalUI/LoginPharmcy$6.class new file mode 100644 index 0000000..7209435 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/LoginPharmcy$6.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/LoginPharmcy.class b/build/classes/com/sdtssp/hospitalUI/LoginPharmcy.class new file mode 100644 index 0000000..c1fceb7 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/LoginPharmcy.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/LoginPharmcy.form b/build/classes/com/sdtssp/hospitalUI/LoginPharmcy.form new file mode 100644 index 0000000..7cf61d2 --- /dev/null +++ b/build/classes/com/sdtssp/hospitalUI/LoginPharmcy.form @@ -0,0 +1,238 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/classes/com/sdtssp/hospitalUI/Menu$1.class b/build/classes/com/sdtssp/hospitalUI/Menu$1.class new file mode 100644 index 0000000..a39c2f8 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Menu$1.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Menu$10.class b/build/classes/com/sdtssp/hospitalUI/Menu$10.class new file mode 100644 index 0000000..ca56ff4 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Menu$10.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Menu$11.class b/build/classes/com/sdtssp/hospitalUI/Menu$11.class new file mode 100644 index 0000000..a1fa321 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Menu$11.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Menu$12.class b/build/classes/com/sdtssp/hospitalUI/Menu$12.class new file mode 100644 index 0000000..83fd067 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Menu$12.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Menu$13.class b/build/classes/com/sdtssp/hospitalUI/Menu$13.class new file mode 100644 index 0000000..ba34a0a Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Menu$13.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Menu$14.class b/build/classes/com/sdtssp/hospitalUI/Menu$14.class new file mode 100644 index 0000000..13bcd6a Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Menu$14.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Menu$15.class b/build/classes/com/sdtssp/hospitalUI/Menu$15.class new file mode 100644 index 0000000..48e745e Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Menu$15.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Menu$16.class b/build/classes/com/sdtssp/hospitalUI/Menu$16.class new file mode 100644 index 0000000..2126359 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Menu$16.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Menu$17.class b/build/classes/com/sdtssp/hospitalUI/Menu$17.class new file mode 100644 index 0000000..4aa0d6e Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Menu$17.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Menu$18.class b/build/classes/com/sdtssp/hospitalUI/Menu$18.class new file mode 100644 index 0000000..bb7fffd Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Menu$18.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Menu$2.class b/build/classes/com/sdtssp/hospitalUI/Menu$2.class new file mode 100644 index 0000000..4081b13 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Menu$2.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Menu$3.class b/build/classes/com/sdtssp/hospitalUI/Menu$3.class new file mode 100644 index 0000000..f41a99c Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Menu$3.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Menu$4.class b/build/classes/com/sdtssp/hospitalUI/Menu$4.class new file mode 100644 index 0000000..0cae20a Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Menu$4.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Menu$5.class b/build/classes/com/sdtssp/hospitalUI/Menu$5.class new file mode 100644 index 0000000..22200fd Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Menu$5.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Menu$6.class b/build/classes/com/sdtssp/hospitalUI/Menu$6.class new file mode 100644 index 0000000..73ab461 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Menu$6.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Menu$7.class b/build/classes/com/sdtssp/hospitalUI/Menu$7.class new file mode 100644 index 0000000..121340e Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Menu$7.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Menu$8.class b/build/classes/com/sdtssp/hospitalUI/Menu$8.class new file mode 100644 index 0000000..beff869 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Menu$8.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Menu$9.class b/build/classes/com/sdtssp/hospitalUI/Menu$9.class new file mode 100644 index 0000000..0e8c6d9 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Menu$9.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Menu.class b/build/classes/com/sdtssp/hospitalUI/Menu.class new file mode 100644 index 0000000..7553915 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Menu.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Menu.form b/build/classes/com/sdtssp/hospitalUI/Menu.form new file mode 100644 index 0000000..76f696d --- /dev/null +++ b/build/classes/com/sdtssp/hospitalUI/Menu.form @@ -0,0 +1,1487 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/classes/com/sdtssp/hospitalUI/NewUser$1.class b/build/classes/com/sdtssp/hospitalUI/NewUser$1.class new file mode 100644 index 0000000..c8763c1 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/NewUser$1.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/NewUser$2.class b/build/classes/com/sdtssp/hospitalUI/NewUser$2.class new file mode 100644 index 0000000..ec9fdb3 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/NewUser$2.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/NewUser$3.class b/build/classes/com/sdtssp/hospitalUI/NewUser$3.class new file mode 100644 index 0000000..e252665 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/NewUser$3.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/NewUser$4.class b/build/classes/com/sdtssp/hospitalUI/NewUser$4.class new file mode 100644 index 0000000..cf02a5f Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/NewUser$4.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/NewUser$5.class b/build/classes/com/sdtssp/hospitalUI/NewUser$5.class new file mode 100644 index 0000000..49e80d6 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/NewUser$5.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/NewUser$6.class b/build/classes/com/sdtssp/hospitalUI/NewUser$6.class new file mode 100644 index 0000000..b24ff68 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/NewUser$6.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/NewUser$7.class b/build/classes/com/sdtssp/hospitalUI/NewUser$7.class new file mode 100644 index 0000000..8ada1d0 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/NewUser$7.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/NewUser$8.class b/build/classes/com/sdtssp/hospitalUI/NewUser$8.class new file mode 100644 index 0000000..23c0297 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/NewUser$8.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/NewUser.class b/build/classes/com/sdtssp/hospitalUI/NewUser.class new file mode 100644 index 0000000..38bff7b Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/NewUser.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/NewUser.form b/build/classes/com/sdtssp/hospitalUI/NewUser.form new file mode 100644 index 0000000..96b89bf --- /dev/null +++ b/build/classes/com/sdtssp/hospitalUI/NewUser.form @@ -0,0 +1,352 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/classes/com/sdtssp/hospitalUI/Retail.class b/build/classes/com/sdtssp/hospitalUI/Retail.class new file mode 100644 index 0000000..d8b8885 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/Retail.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/Retail.form b/build/classes/com/sdtssp/hospitalUI/Retail.form new file mode 100644 index 0000000..b6b7f94 --- /dev/null +++ b/build/classes/com/sdtssp/hospitalUI/Retail.form @@ -0,0 +1,556 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + </TableColumnModel> + </Property> + <Property name="rowHeight" type="int" value="40"/> + <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> + <TableHeader reorderingAllowed="true" resizingAllowed="true"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="jButton3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Remove"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton4"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Go"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton4ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel11"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value=" N A"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel13"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value=" N A"/> + </Properties> + </Component> + <Container class="javax.swing.JPanel" name="jPanel1"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel16" alignment="0" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel15" min="-2" max="-2" attributes="0"/> + <Component id="jLabel12" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel14" alignment="0" min="-2" pref="83" max="-2" attributes="0"/> + </Group> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton2" min="-2" pref="139" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="36" max="-2" attributes="0"/> + <Component id="jLabel15" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="jLabel16" min="-2" pref="36" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> + <Component id="jLabel12" min="-2" pref="29" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="jLabel14" min="-2" pref="37" max="-2" attributes="0"/> + <EmptySpace pref="48" max="32767" attributes="0"/> + <Component id="jButton2" min="-2" pref="55" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel16"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="0" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="0"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel12"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="24" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Total : "/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel14"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="24" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="33" green="33" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="0"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel15"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value=" Total items"/> + </Properties> + </Component> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Arial" size="21" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="ff" red="66" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Checkout"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/build/classes/com/sdtssp/hospitalUI/View$1.class b/build/classes/com/sdtssp/hospitalUI/View$1.class new file mode 100644 index 0000000..6403dce Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/View$1.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/View.class b/build/classes/com/sdtssp/hospitalUI/View.class new file mode 100644 index 0000000..29bf8e0 Binary files /dev/null and b/build/classes/com/sdtssp/hospitalUI/View.class differ diff --git a/build/classes/com/sdtssp/hospitalUI/View.form b/build/classes/com/sdtssp/hospitalUI/View.form new file mode 100644 index 0000000..fa2e5a0 --- /dev/null +++ b/build/classes/com/sdtssp/hospitalUI/View.form @@ -0,0 +1,124 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="2"/> + <Property name="title" type="java.lang.String" value="Data"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="true"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace pref="31" max="32767" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="29" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="-2" pref="13" max="-2" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="19" max="-2" attributes="0"/> + <Component id="jScrollPane1" pref="1310" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="301" max="-2" attributes="0"/> + <Component id="UpdBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="deleteRecBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="393" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> + <Component id="jScrollPane1" max="32767" attributes="0"/> + <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="UpdBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="deleteRecBtn" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="ViewTab"> + <Properties> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> + <Connection code="new javax.swing.table.DefaultTableModel( new Object [][] { }, str ) " type="code"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_CreateCodePost" type="java.lang.String" value="String [] str = new String [] {}; if(this.Caller.equals("Patient")) { str = this.pat; } else str = this.doc;"/> + </AuxValues> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="UpdBtn"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Update"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="UpdBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="deleteRecBtn"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Delete"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="deleteRecBtnActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/build/classes/images/icons8-task-completed-48.png b/build/classes/images/icons8-task-completed-48.png new file mode 100644 index 0000000..770d110 Binary files /dev/null and b/build/classes/images/icons8-task-completed-48.png differ diff --git a/build/classes/images/panchaved-logo.png b/build/classes/images/panchaved-logo.png new file mode 100644 index 0000000..d152f73 Binary files /dev/null and b/build/classes/images/panchaved-logo.png differ diff --git a/build/classes/images/panchaved.gif b/build/classes/images/panchaved.gif new file mode 100644 index 0000000..19f500b Binary files /dev/null and b/build/classes/images/panchaved.gif differ diff --git a/build/classes/images/success.png b/build/classes/images/success.png new file mode 100644 index 0000000..d0d34b1 Binary files /dev/null and b/build/classes/images/success.png differ diff --git a/lib/${distro.zipfilename.extensions}.nbm b/lib/${distro.zipfilename.extensions}.nbm new file mode 100644 index 0000000..ab1ec9c Binary files /dev/null and b/lib/${distro.zipfilename.extensions}.nbm differ diff --git a/lib/JTattoo-1.6.12.jar b/lib/JTattoo-1.6.12.jar new file mode 100644 index 0000000..82e4cf5 Binary files /dev/null and b/lib/JTattoo-1.6.12.jar differ diff --git a/lib/iReport-5.5.0.nbm b/lib/iReport-5.5.0.nbm new file mode 100644 index 0000000..b5bd26d Binary files /dev/null and b/lib/iReport-5.5.0.nbm differ diff --git a/lib/jasperreports-components-plugin-5.5.0.nbm b/lib/jasperreports-components-plugin-5.5.0.nbm new file mode 100644 index 0000000..cd3a7cd Binary files /dev/null and b/lib/jasperreports-components-plugin-5.5.0.nbm differ diff --git a/lib/jasperserver-plugin-5.5.0.nbm b/lib/jasperserver-plugin-5.5.0.nbm new file mode 100644 index 0000000..ae3ed20 Binary files /dev/null and b/lib/jasperserver-plugin-5.5.0.nbm differ diff --git a/lib/jcalendar-1.4.jar b/lib/jcalendar-1.4.jar new file mode 100644 index 0000000..617a335 Binary files /dev/null and b/lib/jcalendar-1.4.jar differ diff --git a/lib/mysql-connector-java-5.1.47.jar b/lib/mysql-connector-java-5.1.47.jar new file mode 100644 index 0000000..f3398ed Binary files /dev/null and b/lib/mysql-connector-java-5.1.47.jar differ diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties index 5ea48a8..c8c434c 100644 --- a/nbproject/private/private.properties +++ b/nbproject/private/private.properties @@ -1,6 +1,8 @@ compile.on.save=true do.depend=false do.jar=true +file.reference.jcalendar-1.4.jar=/home/nilesh/NetBeansProjects/HospitalManagement/lib/jcalendar-1.4.jar +file.reference.mysql-connector-java-5.1.47.jar=/home/nilesh/NetBeansProjects/HospitalManagement/lib/mysql-connector-java-5.1.23-bin.jar javac.debug=true javadoc.preview=true -user.properties.file=C:\\Users\\pranav\\AppData\\Roaming\\NetBeans\\8.2\\build.properties +user.properties.file=/home/nilesh/.netbeans/8.2/build.properties diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml index b2c3579..1bb68bf 100644 --- a/nbproject/private/private.xml +++ b/nbproject/private/private.xml @@ -1,11 +1,25 @@ <?xml version="1.0" encoding="UTF-8"?> <project-private xmlns="http://www.netbeans.org/ns/project-private/1"> - <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> + <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="1"> + <file> + <url>src/com/sdtssp/DBConnect.java</url> + <bookmark id="1"> + <name/> + <line>0</line> + <key/> + </bookmark> + </file> + </editor-bookmarks> <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2"> <group> - <file>file:/C:/Users/shreeram/Documents/NetBeansProjects/Pharmacy/src/com/sdtssp/hospitalUI/LoginPharmcy.java</file> - <file>file:/C:/Users/shreeram/Documents/NetBeansProjects/Pharmacy/src/com/sdtssp/Pharmacy.java</file> - <file>file:/C:/Users/shreeram/Documents/NetBeansProjects/Pharmacy/src/com/sdtssp/hospitalUI/Retail.java</file> + <file>file:/home/nilesh/NetBeansProjects/HospitalManagement/src/com/sdtssp/hospitalUI/NewUser.java</file> + <file>file:/home/nilesh/NetBeansProjects/HospitalManagement/src/com/sdtssp/hospitalUI/Menu.java</file> + <file>file:/home/nilesh/NetBeansProjects/HospitalManagement/src/com/sdtssp/hospitalUI/LoginPharmcy.java</file> + <file>file:/home/nilesh/NetBeansProjects/HospitalManagement/src/com/sdtssp/hospitalUI/ForgotPwd.java</file> + <file>file:/home/nilesh/NetBeansProjects/HospitalManagement/src/com/sdtssp/hospitalUI/BillPreview.java</file> + <file>file:/home/nilesh/NetBeansProjects/HospitalManagement/src/com/sdtssp/hospitalUI/Retail.java</file> + <file>file:/home/nilesh/NetBeansProjects/HospitalManagement/src/com/sdtssp/hospitalUI/View.java</file> + <file>file:/home/nilesh/NetBeansProjects/HospitalManagement/src/com/sdtssp/DBConnect.java</file> </group> </open-files> </project-private> diff --git a/nbproject/project.properties b/nbproject/project.properties index 9fa9270..59aa964 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -29,11 +29,27 @@ dist.jar=${dist.dir}/HospitalManagement.jar dist.javadoc.dir=${dist.dir}/javadoc endorsed.classpath= excludes= +file.reference.jcalendar-1.4.jar=/home/nilesh/Downloads/jcalendar-1.4.jar +file.reference.jcalendar-1.4.jar-1=lib/jcalendar-1.4.jar +file.reference.JTattoo-1.6.12.jar=/home/nilesh/Downloads/JTattoo-1.6.12.jar +file.reference.JTattoo-1.6.12.jar-1=lib\\JTattoo-1.6.12.jar +file.reference.mysql-connector-java-5.1.23-bin.jar=/home/nilesh/netbeans-8.2/ide/modules/ext/mysql-connector-java-5.1.23-bin.jar +file.reference.mysql-connector-java-5.1.47.jar=C:\\Users\\shreeram\\Documents\\NetBeansProjects\\libs\\mysql-connector-java-5.1.47.jar file.reference.swingx-all-1.6.4.jar=lib/swingx-all-1.6.4.jar includes=** jar.compress=false javac.classpath=\ - ${file.reference.swingx-all-1.6.4.jar} + ${file.reference.swingx-all-1.6.4.jar}:\ + ${file.reference.mysql-connector-java-5.1.23-bin.jar}:\ + ${file.reference.jcalendar-1.4.jar}:\ + ${libs.absolutelayout.classpath}:\ + ${file.reference.jcalendar-1.4.jar-1}:\ + ${file.reference.JTattoo-1.6.12.jar-1}:\ + ${file.reference.mysql-connector-java-5.1.47.jar} + ${file.reference.mysql-connector-java-5.1.47.jar} + + ${file.reference.JTattoo-1.6.12.jar} +refs/remotes/origin/nilesh # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false diff --git a/shreeram.txt b/shreeram.txt new file mode 100644 index 0000000..1753e7d --- /dev/null +++ b/shreeram.txt @@ -0,0 +1,2 @@ + +v1.1 diff --git a/src/com/sdtssp/DBConnect.java b/src/com/sdtssp/DBConnect.java new file mode 100644 index 0000000..59dfecb --- /dev/null +++ b/src/com/sdtssp/DBConnect.java @@ -0,0 +1,40 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.sdtssp; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author nilesh + */ +public class DBConnect +{ + public static Connection con=null; + static String user = System.getenv("SQLUSERNAME"); + static String password = System.getenv("SQLPASSWORD"); + + + public static Connection Connect() + { + try + { + Class.forName("com.mysql.jdbc.Driver"); + System.out.println(user+" "+password); + + con = DriverManager.getConnection("jdbc:mysql://localhost:3306/hospital",user, password); + return con; + } catch (ClassNotFoundException|SQLException ex) + { + Logger.getLogger(DBConnect.class.getName()).log(Level.SEVERE, null, ex); + return null; + } + } +} diff --git a/src/com/sdtssp/Medicine.java b/src/com/sdtssp/Medicine.java new file mode 100644 index 0000000..8e96d63 --- /dev/null +++ b/src/com/sdtssp/Medicine.java @@ -0,0 +1,83 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.sdtssp; + +/** + * + * @author shreeram + */ +public class Medicine +{ + boolean select ; + String name; + int batch; + int qty; + int mrp; + int amount; + + public Medicine(boolean select, String name, int batch, int qty, int mrp, int amount) { + this.select = select; + this.name = name; + this.batch = batch; + this.qty = qty; + this.mrp = mrp; + this.amount = amount; + } + + public boolean isSelect() { + return select; + } + + public void setSelect(boolean select) { + this.select = select; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getBatch() { + return batch; + } + + public void setBatch(int batch) { + this.batch = batch; + } + + public int getQty() { + return qty; + } + + public void setQty(int qty) { + this.qty = qty; + } + + public int getMrp() { + return mrp; + } + + public void setMrp(int mrp) { + this.mrp = mrp; + } + + public int getAmount() { + return amount; + } + + public void setAmount(int amount) { + this.amount = amount; + } + + @Override + public String toString() { + return "Medicine{" + "select=" + select + ", name=" + name + ", batch=" + batch + ", qty=" + qty + ", mrp=" + mrp + ", amount=" + amount + '}'; + } + +} diff --git a/src/com/sdtssp/MedicineTableModel.java b/src/com/sdtssp/MedicineTableModel.java new file mode 100644 index 0000000..30523cb --- /dev/null +++ b/src/com/sdtssp/MedicineTableModel.java @@ -0,0 +1,85 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.sdtssp; + +/** + * + * @author shreeram + */ +import java.util.List; +import java.util.Vector; +import javax.swing.table.AbstractTableModel; + + +public class MedicineTableModel extends AbstractTableModel +{ + private final Vector<Medicine> medicineList; + + private final String[] columnNames = new String[] { + "Select", "Name", "Batch", "QTY", "MRP", "AMT" + }; + private final Class[] columnClass = new Class[] { + Boolean.class , String.class, Integer.class,Integer.class,Integer.class,Integer.class + }; + + public MedicineTableModel(Vector<Medicine> medicineList) + { + this.medicineList = medicineList; + } + public Vector getMed(){ + return medicineList; + } + + @Override + public String getColumnName(int column) + { + return columnNames[column]; + } + + @Override + public Class<?> getColumnClass(int columnIndex) + { + return columnClass[columnIndex]; + } + + @Override + public int getColumnCount() + { + return columnNames.length; + } + + @Override + public int getRowCount() + { + return medicineList.size(); + } + + @Override + public Object getValueAt(int rowIndex, int columnIndex) + { + Medicine row = medicineList.get(rowIndex); + if(0 == columnIndex) { + return row.isSelect(); + } + else if(1 == columnIndex) { + return row.getName(); + } + else if(2 == columnIndex) { + return row.getBatch(); + } + else if(3 == columnIndex) { + return row.getQty(); + } + else if(4 == columnIndex) { + return row.getMrp(); + } + else if(5 == columnIndex) { + return row.getAmount(); + } + + return null; + } +} diff --git a/src/com/sdtssp/Pharmacy.java b/src/com/sdtssp/Pharmacy.java index 87858bb..4294b1f 100644 --- a/src/com/sdtssp/Pharmacy.java +++ b/src/com/sdtssp/Pharmacy.java @@ -9,6 +9,13 @@ import com.sdtssp.hospitalUI.LoginPharmcy; import com.sdtssp.hospitalUI.*; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.JOptionPane; /** * @@ -19,6 +26,43 @@ public class Pharmacy { /** * @param args the command line arguments */ + static Statement stmt; + private static Connection conn = DBConnect.Connect(); + static ResultSet rs; + static int i; +public static int updateMedQty(int qty, String name){ + int status = 0; + try { + System.out.println("qty:"+qty); + stmt = conn.createStatement(); + String sql = "update medicine set Qty = "+qty +" where Name = '"+ name +"';"; + System.out.println("sql:"+sql); + status = stmt.executeUpdate(sql); + System.out.println("status :"+status); + } catch (SQLException ex) { + Logger.getLogger(Pharmacy.class.getName()).log(Level.SEVERE, null, ex); + } + return status; +} + public static ResultSet selectMedItems(String med) { + try { + + stmt = conn.createStatement(); + String sql = "select * from medicine where Name "+med; + System.out.println("sql:"+sql); + rs = stmt.executeQuery(sql); + + } catch (SQLException ex) { + Logger.getLogger(Retail.class.getName()).log(Level.SEVERE, null, ex); + } + return rs; + } + public static int myau(String m){ + System.out.println("com.sdtssp.Pharmacy.myau() : "+m); + return i; + } + + public static void main(String[] args) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { diff --git a/src/com/sdtssp/SortedComboBoxModel.java b/src/com/sdtssp/SortedComboBoxModel.java new file mode 100644 index 0000000..fa56d27 --- /dev/null +++ b/src/com/sdtssp/SortedComboBoxModel.java @@ -0,0 +1,50 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.sdtssp; + +import java.util.Arrays; +import java.util.Collections; +import java.util.Vector; +import javax.swing.DefaultComboBoxModel; + +/** + * + * @author nilesh + */ +public class SortedComboBoxModel extends DefaultComboBoxModel { + public SortedComboBoxModel() { + super(); + } + public SortedComboBoxModel(Object[] items) { + Arrays.sort(items); + int size = items.length; + for (int i = 0; i < size; i++) { + super.addElement(items[i]); + } + setSelectedItem(items[0]); + } + public SortedComboBoxModel(Vector items) { + Collections.sort(items); + int size = items.size(); + for (int i = 0; i < size; i++) { + super.addElement(items.elementAt(i)); + } + setSelectedItem(items.elementAt(0)); + } + public void addElement(Object element) { + insertElementAt(element, 0); + } + public void insertElementAt(Object element, int index) { + int size = getSize(); + for (index = 0; index < size; index++) { + Comparable c = (Comparable) getElementAt(index); + if (c.compareTo(element) > 0) { + break; + } + } + super.insertElementAt(element, index); + } + } diff --git a/src/com/sdtssp/Validators.java b/src/com/sdtssp/Validators.java new file mode 100644 index 0000000..3dda425 --- /dev/null +++ b/src/com/sdtssp/Validators.java @@ -0,0 +1,35 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.sdtssp; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * + * @author nilesh + */ +public class Validators { + final String emailReg = "^[A-Za-z0-9+_.-]+@(.+)$"; + final String contactReg = "^[0-9]{10}$"; + final public String emailErr = "<html><font color=red>Invalid Email!!!</font></html>"; + final public String contactErr = "<html><font color=red>Invalid Phone!!!Enter 10 digit Contact.</font></html>"; + Pattern patemail,patcontact; + + public Validators(){ + patemail = Pattern.compile(emailReg); + patcontact = Pattern.compile(contactReg); + } + + + public boolean valEmail(String email){ + return patemail.matcher(email).matches(); + } + + public boolean valPhn(String contact){ + return patcontact.matcher(contact).matches(); + } +} diff --git a/src/com/sdtssp/hospitalUI/BillPreview.form b/src/com/sdtssp/hospitalUI/BillPreview.form new file mode 100644 index 0000000..a642665 --- /dev/null +++ b/src/com/sdtssp/hospitalUI/BillPreview.form @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel1" alignment="0" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="333" max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace pref="277" max="32767" attributes="0"/> + <Component id="jScrollPane1" min="-2" pref="250" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="235" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jScrollPane1" pref="442" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="area"> + <Properties> + <Property name="editable" type="boolean" value="false"/> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Arial" size="24" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="0" red="0" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Bill Preiview"/> + </Properties> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/src/com/sdtssp/hospitalUI/BillPreview.java b/src/com/sdtssp/hospitalUI/BillPreview.java new file mode 100644 index 0000000..80a4c79 --- /dev/null +++ b/src/com/sdtssp/hospitalUI/BillPreview.java @@ -0,0 +1,157 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.sdtssp.hospitalUI; + +/** + * + * @author shreeram + */ +public class BillPreview extends javax.swing.JFrame { + + /** + * Creates new form BillPreview + */ + public BillPreview() { + initComponents(); + + billGenerator(); + } + void billGenerator(){ + String Header = + "****************Panchved******************;\n" + + "Date:"+" sa"+" Time:"+"kk"+"\n;" + + " Original Receipt \n;" + + "------------------------------------------------------\n;" + + "Product Description \n;" + + "Name Qty Amount\n ;" + + + "------------------------------------------------------\n;"; + + String a="assa"+" "+"sas"+" "+"100"+"\n;"; + String h=Header+a; + String amt = + "\n;-----------------------------------------------------\n;" + + "Total Amount: Rs."+100+"\n ;" + + "------------------------------------------------------\n;" + + "------------------------------------------------------\n;" + + "For Further Detail \n;" + + "phone :9552951410\n;" + + "------------------------------------------------------\n;" + + " Software Developed by \n ;" + + " SDTSSP \n;" + + "*************************************************\n;" + + " Thank You \n;" + + "______________________________________________________\n;"; + String f =h+amt; + area.setText(f); + + } + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jPanel1 = new javax.swing.JPanel(); + jScrollPane1 = new javax.swing.JScrollPane(); + area = new javax.swing.JTextArea(); + jLabel1 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + area.setEditable(false); + area.setColumns(20); + area.setRows(5); + jScrollPane1.setViewportView(area); + + jLabel1.setFont(new java.awt.Font("Arial", 1, 24)); // NOI18N + jLabel1.setForeground(new java.awt.Color(0, 0, 255)); + jLabel1.setText("Bill Preiview"); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(333, 333, 333) + .addComponent(jLabel1) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addContainerGap(277, Short.MAX_VALUE) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(235, 235, 235)) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel1) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 442, Short.MAX_VALUE) + .addContainerGap()) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE)) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(BillPreview.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(BillPreview.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(BillPreview.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(BillPreview.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new BillPreview().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JTextArea area; + private javax.swing.JLabel jLabel1; + private javax.swing.JPanel jPanel1; + private javax.swing.JScrollPane jScrollPane1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/com/sdtssp/hospitalUI/Billing.form b/src/com/sdtssp/hospitalUI/Billing.form new file mode 100644 index 0000000..249b61c --- /dev/null +++ b/src/com/sdtssp/hospitalUI/Billing.form @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jSeparator1" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="38" max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="115" max="-2" attributes="0"/> + <Component id="BillLabel" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="230" max="32767" attributes="0"/> + <Component id="jLabel2" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="195" max="-2" attributes="0"/> + <Component id="Namelabel" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="80" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="55" max="-2" attributes="0"/> + <Component id="jSeparator1" min="-2" pref="10" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="29" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="BillLabel" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="Namelabel" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="350" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JSeparator" name="jSeparator1"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="text" type="java.lang.String" value="jLabel1"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="BillLabel"> + <Properties> + <Property name="text" type="java.lang.String" value="jLabel2"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="text" type="java.lang.String" value="jLabel2"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="Namelabel"> + <Properties> + <Property name="text" type="java.lang.String" value="jLabel3"/> + </Properties> + </Component> + </SubComponents> +</Form> diff --git a/src/com/sdtssp/hospitalUI/Billing.java b/src/com/sdtssp/hospitalUI/Billing.java new file mode 100644 index 0000000..17ec0fa --- /dev/null +++ b/src/com/sdtssp/hospitalUI/Billing.java @@ -0,0 +1,124 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.sdtssp.hospitalUI; + +/** + * + * @author nilesh + */ +public class Billing extends javax.swing.JFrame { + + /** + * Creates new form Billing + */ + public Billing() { + initComponents(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jSeparator1 = new javax.swing.JSeparator(); + jLabel1 = new javax.swing.JLabel(); + BillLabel = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); + Namelabel = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + jLabel1.setText("jLabel1"); + + BillLabel.setText("jLabel2"); + + jLabel2.setText("jLabel2"); + + Namelabel.setText("jLabel3"); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addContainerGap() + .addComponent(jSeparator1) + .addContainerGap()) + .addGroup(layout.createSequentialGroup() + .addGap(38, 38, 38) + .addComponent(jLabel1) + .addGap(115, 115, 115) + .addComponent(BillLabel) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 230, Short.MAX_VALUE) + .addComponent(jLabel2) + .addGap(195, 195, 195) + .addComponent(Namelabel) + .addGap(80, 80, 80)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(55, 55, 55) + .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(29, 29, 29) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel1) + .addComponent(BillLabel) + .addComponent(jLabel2) + .addComponent(Namelabel)) + .addContainerGap(350, Short.MAX_VALUE)) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(Billing.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(Billing.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(Billing.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(Billing.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new Billing().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JLabel BillLabel; + private javax.swing.JLabel Namelabel; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JSeparator jSeparator1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/com/sdtssp/hospitalUI/ForgotPwd.form b/src/com/sdtssp/hospitalUI/ForgotPwd.form new file mode 100644 index 0000000..0d26e1c --- /dev/null +++ b/src/com/sdtssp/hospitalUI/ForgotPwd.form @@ -0,0 +1,238 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="Forgot Password"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace pref="129" max="32767" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="142" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace pref="33" max="32767" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="25" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="70" pref="70" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel5" min="-2" max="-2" attributes="0"/> + <Component id="jLabel2" min="-2" max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="Sec_Ques" alignment="1" min="-2" max="-2" attributes="0"/> + <Component id="Email" alignment="1" min="-2" pref="186" max="-2" attributes="0"/> + <Component id="Sec_Ans" alignment="1" min="-2" pref="134" max="-2" attributes="0"/> + <Component id="PwdD" alignment="1" min="-2" pref="146" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="114" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jSeparator1" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="197" max="-2" attributes="0"/> + <Component id="Get_PwdBtn" min="-2" pref="196" max="-2" attributes="0"/> + <EmptySpace pref="76" max="32767" attributes="0"/> + <Component id="LoginBtn" min="-2" pref="150" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="164" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="EmailErr" min="-2" pref="372" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="59" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Component id="jLabel6" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="304" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Component id="jLabel4" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="298" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="-2" pref="26" max="-2" attributes="0"/> + <Component id="jLabel6" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="jSeparator1" min="-2" pref="11" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="jLabel4" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="26" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + <Component id="Email" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="Sec_Ques" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="29" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="Sec_Ans" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="23" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="jLabel3" min="-2" max="-2" attributes="0"/> + <Component id="PwdD" min="-2" pref="25" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="Get_PwdBtn" alignment="3" min="-2" pref="40" max="-2" attributes="0"/> + <Component id="LoginBtn" alignment="3" min="-2" pref="40" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="5" max="-2" attributes="0"/> + <Component id="EmailErr" min="-2" pref="24" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="Get_PwdBtn"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Get Password"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="Get_PwdBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Email"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Security Question"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Password"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="Email"> + <Events> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="EmailFocusLost"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="PwdD"> + </Component> + <Component class="javax.swing.JComboBox" name="Sec_Ques"> + <Properties> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="3"> + <StringItem index="0" value="Hospital''s foundation year?"/> + <StringItem index="1" value="Hospital''s name?"/> + <StringItem index="2" value="Medical''s store name?"/> + </StringArray> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="jLabel5"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Security Answer"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="Sec_Ans"> + </Component> + <Component class="javax.swing.JButton" name="LoginBtn"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Back"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="LoginBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JSeparator" name="jSeparator1"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="DialogInput" size="15" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="<html><font color=red>All Fields are Mandatory</font></html>"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="EmailErr"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/images/panchaved.gif"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/src/com/sdtssp/hospitalUI/ForgotPwd.java b/src/com/sdtssp/hospitalUI/ForgotPwd.java new file mode 100644 index 0000000..56b1bd0 --- /dev/null +++ b/src/com/sdtssp/hospitalUI/ForgotPwd.java @@ -0,0 +1,287 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.sdtssp.hospitalUI; + +import com.sdtssp.DBConnect; +import com.sdtssp.Validators; +import java.awt.Color; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.JFrame; +import javax.swing.JOptionPane; + +/** + * + * @author nilesh + */ +public class ForgotPwd extends javax.swing.JFrame { + Statement stmt =null; + Connection con = null; + ResultSet rs =null; + Validators v; + /** + * Creates new form ForgotPwd + */ + public ForgotPwd() { + v = new Validators(); + con = DBConnect.Connect(); + setExtendedState(getExtendedState() | JFrame.MAXIMIZED_BOTH); + getContentPane().setBackground(Color.getHSBColor(1, 1, 0.38f)); + initComponents(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jPanel1 = new javax.swing.JPanel(); + Get_PwdBtn = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); + jLabel3 = new javax.swing.JLabel(); + Email = new javax.swing.JTextField(); + PwdD = new javax.swing.JLabel(); + Sec_Ques = new javax.swing.JComboBox<>(); + jLabel5 = new javax.swing.JLabel(); + Sec_Ans = new javax.swing.JTextField(); + LoginBtn = new javax.swing.JButton(); + jSeparator1 = new javax.swing.JSeparator(); + jLabel4 = new javax.swing.JLabel(); + EmailErr = new javax.swing.JLabel(); + jLabel6 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("Forgot Password"); + + Get_PwdBtn.setFont(new java.awt.Font("Chilanka", 1, 18)); // NOI18N + Get_PwdBtn.setText("Get Password"); + Get_PwdBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + Get_PwdBtnActionPerformed(evt); + } + }); + + jLabel1.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel1.setText("Email"); + + jLabel2.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel2.setText("Security Question"); + + jLabel3.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel3.setText("Password"); + + Email.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusLost(java.awt.event.FocusEvent evt) { + EmailFocusLost(evt); + } + }); + + Sec_Ques.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Hospital''s foundation year?", "Hospital''s name?", "Medical''s store name?" })); + + jLabel5.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel5.setText("Security Answer"); + + LoginBtn.setFont(new java.awt.Font("Chilanka", 1, 18)); // NOI18N + LoginBtn.setText("Back"); + LoginBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + LoginBtnActionPerformed(evt); + } + }); + + jLabel4.setFont(new java.awt.Font("DialogInput", 1, 15)); // NOI18N + jLabel4.setText("<html><font color=red>All Fields are Mandatory</font></html>"); + + jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/panchaved.gif"))); // NOI18N + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(70, 70, 70) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel3) + .addComponent(jLabel5) + .addComponent(jLabel2) + .addComponent(jLabel1)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(Sec_Ques, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(Email, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(Sec_Ans, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(PwdD, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(114, 114, 114)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jSeparator1) + .addContainerGap()) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(197, 197, 197) + .addComponent(Get_PwdBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 76, Short.MAX_VALUE) + .addComponent(LoginBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(164, 164, 164)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addComponent(EmailErr, javax.swing.GroupLayout.PREFERRED_SIZE, 372, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(59, 59, 59)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addComponent(jLabel6) + .addGap(304, 304, 304)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(298, 298, 298)))) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addGap(26, 26, 26) + .addComponent(jLabel6) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 11, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(26, 26, 26) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jLabel1) + .addComponent(Email, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(37, 37, 37) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel2) + .addComponent(Sec_Ques, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(29, 29, 29) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel5) + .addComponent(Sec_Ans, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(23, 23, 23) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jLabel3) + .addComponent(PwdD, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(28, 28, 28) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(Get_PwdBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(LoginBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(5, 5, 5) + .addComponent(EmailErr, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addContainerGap(129, Short.MAX_VALUE) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(142, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addContainerGap(33, Short.MAX_VALUE) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(25, Short.MAX_VALUE)) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void Get_PwdBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Get_PwdBtnActionPerformed + try { + // TODO add your handling code here: + String sql = "select password from registrations where email_id='"+Email.getText()+"' and sec_que = '"+Sec_Ques.getSelectedItem()+"' and sec_ans = '"+Sec_Ans.getText()+"';"; + + stmt = con.createStatement(); + rs = stmt.executeQuery(sql); + rs.next(); + PwdD.setText(rs.getString("password")); + + } catch (SQLException ex) { + Logger.getLogger(ForgotPwd.class.getName()).log(Level.SEVERE, null, ex); + } + + }//GEN-LAST:event_Get_PwdBtnActionPerformed + + private void EmailFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_EmailFocusLost + // TODO add your handling code here: + if (!v.valEmail(Email.getText())) { + EmailErr.setText(v.emailErr); + return; + } + else + EmailErr.setText(""); + }//GEN-LAST:event_EmailFocusLost + + private void LoginBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_LoginBtnActionPerformed + // TODO add your handling code here: + this.setVisible(false); + new LoginPharmcy().setVisible(true); + }//GEN-LAST:event_LoginBtnActionPerformed + + /** + * @param args the command line arguments + */ +// public static void main(String args[]) { +// /* Set the Nimbus look and feel */ +// //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> +// /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. +// * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html +// */ +// try { +// for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { +// if ("Nimbus".equals(info.getName())) { +// javax.swing.UIManager.setLookAndFeel(info.getClassName()); +// break; +// } +// } +// } catch (ClassNotFoundException ex) { +// java.util.logging.Logger.getLogger(ForgotPwd.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); +// } catch (InstantiationException ex) { +// java.util.logging.Logger.getLogger(ForgotPwd.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); +// } catch (IllegalAccessException ex) { +// java.util.logging.Logger.getLogger(ForgotPwd.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); +// } catch (javax.swing.UnsupportedLookAndFeelException ex) { +// java.util.logging.Logger.getLogger(ForgotPwd.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); +// } +// //</editor-fold> +// +// /* Create and display the form */ +// java.awt.EventQueue.invokeLater(new Runnable() { +// public void run() { +// new ForgotPwd().setVisible(true); +// } +// }); +// } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JTextField Email; + private javax.swing.JLabel EmailErr; + private javax.swing.JButton Get_PwdBtn; + private javax.swing.JButton LoginBtn; + private javax.swing.JLabel PwdD; + private javax.swing.JTextField Sec_Ans; + private javax.swing.JComboBox<String> Sec_Ques; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel6; + private javax.swing.JPanel jPanel1; + private javax.swing.JSeparator jSeparator1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/com/sdtssp/hospitalUI/LoginPharmcy.form b/src/com/sdtssp/hospitalUI/LoginPharmcy.form index 98b837e..7cf61d2 100644 --- a/src/com/sdtssp/hospitalUI/LoginPharmcy.form +++ b/src/com/sdtssp/hospitalUI/LoginPharmcy.form @@ -20,10 +20,17 @@ </NonVisualComponents> <Properties> <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="Login"/> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="33" green="ff" red="99" type="rgb"/> + </Property> + <Property name="iconImage" type="java.awt.Image" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> + <Connection code="new ImageIcon("/home/nilesh/NetBeansProjects/HospitalManagement/src/images/panchaved-logo.png").getImage() " type="code"/> + </Property> </Properties> <SyntheticProperties> <SyntheticProperty name="formSizePolicy" type="int" value="1"/> - <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + <SyntheticProperty name="generateCenter" type="boolean" value="true"/> </SyntheticProperties> <AuxValues> <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> @@ -40,19 +47,19 @@ <Layout> <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="87" max="-2" attributes="0"/> - <Component id="jPanel2" max="-2" attributes="0"/> - <EmptySpace pref="146" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <EmptySpace pref="32" max="32767" attributes="0"/> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="31" max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="39" max="-2" attributes="0"/> - <Component id="jPanel2" max="-2" attributes="0"/> - <EmptySpace pref="138" max="32767" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -62,7 +69,9 @@ <Properties> <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> - <TitledBorder justification="2" title="Login"/> + <TitledBorder justification="2" title="LOGIN"> + <Font PropertyName="font" name="TlwgTypewriter" size="24" style="1"/> + </TitledBorder> </Border> </Property> <Property name="toolTipText" type="java.lang.String" value=""/> @@ -83,49 +92,70 @@ <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" max="-2" attributes="0"> - <Component id="jLabel2" pref="79" max="32767" attributes="0"/> - <Component id="jLabel1" max="32767" attributes="0"/> - </Group> - <EmptySpace min="-2" pref="34" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <EmptySpace min="-2" pref="64" max="-2" attributes="0"/> + <Component id="jLabel3" min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" attributes="0"> - <Component id="jButton1" min="-2" max="-2" attributes="0"/> <EmptySpace type="separate" max="-2" attributes="0"/> - <Component id="jButton2" min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel2" min="-2" pref="162" max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" pref="162" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jTextField1" min="-2" pref="217" max="-2" attributes="0"/> + <Component id="jPasswordField1" min="-2" pref="217" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="95" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="8" max="-2" attributes="0"/> + <Component id="jButton3" min="-2" pref="151" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="61" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jButton1" min="-2" pref="129" max="-2" attributes="0"/> + <EmptySpace pref="61" max="32767" attributes="0"/> + <Component id="jButton2" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Component id="jLabel4" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> </Group> - <Component id="jPasswordField1" alignment="0" max="32767" attributes="0"/> - <Component id="jTextField1" alignment="0" max="32767" attributes="0"/> </Group> - <EmptySpace max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jLabel3" min="-2" pref="560" max="-2" attributes="0"/> <Group type="102" attributes="0"> - <Component id="jTextField1" min="-2" pref="28" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="18" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="19" max="-2" attributes="0"/> + <Component id="jLabel4" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="119" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel1" alignment="3" min="-2" pref="82" max="-2" attributes="0"/> + <Component id="jTextField1" alignment="3" min="-2" pref="44" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="78" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel2" alignment="3" min="-2" pref="85" max="-2" attributes="0"/> + <Component id="jPasswordField1" alignment="3" min="-2" pref="44" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton3" alignment="3" min="-2" pref="52" max="-2" attributes="0"/> + <Component id="jButton1" alignment="3" min="-2" pref="52" max="-2" attributes="0"/> + <Component id="jButton2" alignment="3" min="-2" pref="52" max="-2" attributes="0"/> + </Group> </Group> - <Group type="102" attributes="0"> - <Component id="jLabel1" max="32767" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - </Group> - </Group> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="jLabel2" alignment="3" min="-2" pref="32" max="-2" attributes="0"/> - <Component id="jPasswordField1" alignment="3" min="-2" pref="32" max="-2" attributes="0"/> </Group> <EmptySpace max="32767" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="jButton2" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -135,21 +165,31 @@ </Component> <Component class="javax.swing.JLabel" name="jLabel1"> <Properties> - <Property name="text" type="java.lang.String" value="User id"/> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Lucida Sans Typewriter" size="24" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="User Id"/> </Properties> </Component> <Component class="javax.swing.JLabel" name="jLabel2"> <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Lucida Sans Typewriter" size="24" style="0"/> + </Property> <Property name="text" type="java.lang.String" value="Password"/> </Properties> </Component> <Component class="javax.swing.JPasswordField" name="jPasswordField1"> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jPasswordField1ActionPerformed"/> + <EventHandler event="keyPressed" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="jPasswordField1KeyPressed"/> </Events> </Component> <Component class="javax.swing.JButton" name="jButton1"> <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="20" style="1"/> + </Property> <Property name="text" type="java.lang.String" value="Login"/> </Properties> <Events> @@ -158,8 +198,39 @@ </Component> <Component class="javax.swing.JButton" name="jButton2"> <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="20" style="1"/> + </Property> <Property name="text" type="java.lang.String" value="Forgot Password"/> </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="20" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="New User"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/images/panchaved-logo.png"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/images/panchaved.gif"/> + </Property> + </Properties> </Component> </SubComponents> </Container> diff --git a/src/com/sdtssp/hospitalUI/LoginPharmcy.java b/src/com/sdtssp/hospitalUI/LoginPharmcy.java index 9af6272..761ba61 100644 --- a/src/com/sdtssp/hospitalUI/LoginPharmcy.java +++ b/src/com/sdtssp/hospitalUI/LoginPharmcy.java @@ -1,13 +1,23 @@ package com.sdtssp.hospitalUI; - import javax.swing.JFrame; - +import com.sdtssp.DBConnect; +import java.awt.Color; +import java.awt.event.KeyEvent; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.JOptionPane; +import javax.swing.ImageIcon; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. - */ +*/ /** * @@ -15,16 +25,27 @@ */ public class LoginPharmcy extends javax.swing.JFrame { + Statement stmt = null; + Connection con = null; + ResultSet rs = null; + String user_name,pass; /** * Creates new form Login */ - + public LoginPharmcy() { initComponents(); - setExtendedState(JFrame.MAXIMIZED_BOTH); - new JFrame().setUndecorated(true); + setExtendedState(getExtendedState() | JFrame.MAXIMIZED_BOTH); + getContentPane().setBackground(Color.getHSBColor(1, 1, 0.38f)); +// getRootPane().setDefaultButton(jButton1); + } + + public void Reset(){ + jTextField1.setText(""); + jPasswordField1.setText(""); + } /** * This method is called from within the constructor to initialize the form. @@ -43,6 +64,9 @@ private void initComponents() { jPasswordField1 = new javax.swing.JPasswordField(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); + jButton3 = new javax.swing.JButton(); + jLabel3 = new javax.swing.JLabel(); + jLabel4 = new javax.swing.JLabel(); javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane()); jFrame1.getContentPane().setLayout(jFrame1Layout); @@ -56,16 +80,22 @@ private void initComponents() { ); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("Login"); + setForeground(new java.awt.Color(153, 255, 51)); + setIconImage(new ImageIcon("/home/nilesh/NetBeansProjects/HospitalManagement/src/images/panchaved-logo.png").getImage() + ); - jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Login", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION)); + jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "LOGIN", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("TlwgTypewriter", 1, 24))); // NOI18N jPanel2.setToolTipText(""); jPanel2.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); jPanel2.setMaximumSize(null); jPanel2.setRequestFocusEnabled(false); jPanel2.setVerifyInputWhenFocusTarget(false); - jLabel1.setText("User id"); + jLabel1.setFont(new java.awt.Font("Lucida Sans Typewriter", 0, 24)); // NOI18N + jLabel1.setText("User Id"); + jLabel2.setFont(new java.awt.Font("Lucida Sans Typewriter", 0, 24)); // NOI18N jLabel2.setText("Password"); jPasswordField1.addActionListener(new java.awt.event.ActionListener() { @@ -73,7 +103,13 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jPasswordField1ActionPerformed(evt); } }); + jPasswordField1.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyPressed(java.awt.event.KeyEvent evt) { + jPasswordField1KeyPressed(evt); + } + }); + jButton1.setFont(new java.awt.Font("Chilanka", 1, 20)); // NOI18N jButton1.setText("Login"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -81,46 +117,80 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); + jButton2.setFont(new java.awt.Font("Chilanka", 1, 20)); // NOI18N jButton2.setText("Forgot Password"); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + + jButton3.setFont(new java.awt.Font("Chilanka", 1, 20)); // NOI18N + jButton3.setText("New User"); + jButton3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton3ActionPerformed(evt); + } + }); + + jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/panchaved-logo.png"))); // NOI18N + + jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/panchaved.gif"))); // NOI18N javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() - .addContainerGap() - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE) - .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGap(34, 34, 34) - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGap(64, 64, 64) + .addComponent(jLabel3) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() - .addComponent(jButton1) .addGap(18, 18, 18) - .addComponent(jButton2)) - .addComponent(jPasswordField1) - .addComponent(jTextField1)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(95, 95, 95)) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGap(8, 8, 8) + .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(61, 61, 61) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 61, Short.MAX_VALUE) + .addComponent(jButton2)) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jLabel4) + .addGap(0, 0, Short.MAX_VALUE))) + .addContainerGap()))) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() - .addGap(21, 21, 21) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 560, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel2Layout.createSequentialGroup() - .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18)) - .addGroup(jPanel2Layout.createSequentialGroup() - .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))) - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jButton1) - .addComponent(jButton2)) - .addContainerGap()) + .addGap(19, 19, 19) + .addComponent(jLabel4) + .addGap(119, 119, 119) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(78, 78, 78) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)))) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); @@ -128,38 +198,83 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addGap(87, 87, 87) - .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(146, Short.MAX_VALUE)) + .addContainerGap(32, Short.MAX_VALUE) + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(31, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addGap(39, 39, 39) - .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(138, Short.MAX_VALUE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel2.getAccessibleContext().setAccessibleName(""); pack(); + setLocationRelativeTo(null); }// </editor-fold>//GEN-END:initComponents private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed // TODO add your handling code here: - - setVisible(false); - Retail ob= new Retail(); - ob.setVisible(true); - - // Retail rt = new Retail(); -// rt.setVisible(true); + if (evt.getSource()==jPasswordField1) + { + jButton1.doClick(); + } + con = DBConnect.Connect(); + user_name = jTextField1.getText(); + pass = new String(jPasswordField1.getPassword()); + try { + + stmt = con.createStatement(); + + rs= stmt.executeQuery("select user_name,password from registrations where user_name='"+user_name+"' and password = '"+pass+"';"); + if(rs.first()) + { + new Menu().setVisible(true); + this.setVisible(false); + } + else + { + rs = stmt.executeQuery("select "+user_name+","+pass+" from registrations;"); + while (rs.next()){ + if(rs.getString("user_name").equals(user_name)){ + JOptionPane.showMessageDialog(rootPane, "Wrong Password!!!","Error", HEIGHT); + jPasswordField1.setText(""); + return; + } + } + JOptionPane.showMessageDialog(rootPane,"User not Registered","Error", HEIGHT); + } + + } catch (Exception ex) { + Logger.getLogger(LoginPharmcy.class.getName()).log(Level.SEVERE, null, ex); + } }//GEN-LAST:event_jButton1ActionPerformed private void jPasswordField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jPasswordField1ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jPasswordField1ActionPerformed + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + // TODO add your handling code here: + this.setVisible(false); + new ForgotPwd().setVisible(true); + }//GEN-LAST:event_jButton2ActionPerformed + + private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed + // TODO add your handling code here: + this.setVisible(false); + new NewUser().setVisible(true); + }//GEN-LAST:event_jButton3ActionPerformed + + private void jPasswordField1KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jPasswordField1KeyPressed + // TODO add your handling code here: + if(evt.getKeyCode() == KeyEvent.VK_ENTER) + jButton1.doClick(); + }//GEN-LAST:event_jPasswordField1KeyPressed + /** * @param args the command line arguments */ @@ -191,7 +306,18 @@ public static void main(String args[]) { /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { - new LoginPharmcy().setVisible(true); + try { + UIManager.setLookAndFeel("com.jtattoo.plaf.luna.LunaLookAndFeel"); + new LoginPharmcy().setVisible(true); + } catch (ClassNotFoundException ex) { + Logger.getLogger(LoginPharmcy.class.getName()).log(Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + Logger.getLogger(LoginPharmcy.class.getName()).log(Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + Logger.getLogger(LoginPharmcy.class.getName()).log(Level.SEVERE, null, ex); + } catch (UnsupportedLookAndFeelException ex) { + Logger.getLogger(LoginPharmcy.class.getName()).log(Level.SEVERE, null, ex); + } } }); } @@ -199,13 +325,15 @@ public void run() { // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; + private javax.swing.JButton jButton3; private javax.swing.JFrame jFrame1; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; private javax.swing.JPanel jPanel2; private javax.swing.JPasswordField jPasswordField1; private javax.swing.JTextField jTextField1; // End of variables declaration//GEN-END:variables - } diff --git a/src/com/sdtssp/hospitalUI/Menu.form b/src/com/sdtssp/hospitalUI/Menu.form new file mode 100644 index 0000000..76f696d --- /dev/null +++ b/src/com/sdtssp/hospitalUI/Menu.form @@ -0,0 +1,1487 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <NonVisualComponents> + <Component class="javax.swing.ButtonGroup" name="buttonGroup1"> + </Component> + <Component class="javax.swing.ButtonGroup" name="buttonGroup2"> + </Component> + </NonVisualComponents> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="Main Menu"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> + <Connection code="Color.RED" type="code"/> + </Property> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Component id="jTabbedPane4" min="-2" pref="853" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="LogoutBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="LogoutBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + <Component id="jTabbedPane4" max="32767" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JTabbedPane" name="jTabbedPane4"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="24" style="2"/> + </Property> + </Properties> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel8"> + <Properties> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[32767, 32000]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[851, 620]"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="PATIENT"> + <Property name="tabTitle" type="java.lang.String" value="PATIENT"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="297" pref="297" max="-2" attributes="0"/> + <Component id="jLabel27" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="6" pref="6" max="-2" attributes="0"/> + <Component id="jSeparator3" min="-2" pref="829" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="74" pref="74" max="-2" attributes="0"/> + <Component id="jLabel28" min="-2" max="-2" attributes="0"/> + <EmptySpace min="75" pref="75" max="-2" attributes="0"/> + <Component id="P_id" min="-2" pref="138" max="-2" attributes="0"/> + <EmptySpace min="110" pref="110" max="-2" attributes="0"/> + <Component id="jLabel33" min="-2" max="-2" attributes="0"/> + <EmptySpace min="82" pref="82" max="-2" attributes="0"/> + <Component id="Age" min="-2" pref="98" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="74" pref="74" max="-2" attributes="0"/> + <Component id="jLabel29" min="-2" max="-2" attributes="0"/> + <EmptySpace min="46" pref="46" max="-2" attributes="0"/> + <Component id="Name" min="-2" pref="138" max="-2" attributes="0"/> + <EmptySpace min="110" pref="110" max="-2" attributes="0"/> + <Component id="jLabel34" min="-2" max="-2" attributes="0"/> + <EmptySpace min="86" pref="86" max="-2" attributes="0"/> + <Component id="Male" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="74" pref="74" max="-2" attributes="0"/> + <Component id="jLabel30" min="-2" max="-2" attributes="0"/> + <EmptySpace min="44" pref="44" max="-2" attributes="0"/> + <Component id="F_Name" min="-2" pref="138" max="-2" attributes="0"/> + <EmptySpace min="238" pref="238" max="-2" attributes="0"/> + <Component id="Female" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="74" pref="74" max="-2" attributes="0"/> + <Component id="jLabel31" min="-2" max="-2" attributes="0"/> + <EmptySpace min="117" pref="117" max="-2" attributes="0"/> + <Component id="Email" min="-2" pref="138" max="-2" attributes="0"/> + <EmptySpace min="110" pref="110" max="-2" attributes="0"/> + <Component id="jLabel35" min="-2" max="-2" attributes="0"/> + <EmptySpace min="56" pref="56" max="-2" attributes="0"/> + <Component id="BldGrp" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="74" pref="74" max="-2" attributes="0"/> + <Component id="jLabel32" min="-2" max="-2" attributes="0"/> + <EmptySpace min="63" pref="63" max="-2" attributes="0"/> + <Component id="Contact" min="-2" pref="138" max="-2" attributes="0"/> + <EmptySpace min="110" pref="110" max="-2" attributes="0"/> + <Component id="jLabel14" min="-2" max="-2" attributes="0"/> + <EmptySpace min="50" pref="50" max="-2" attributes="0"/> + <Component id="AlttDoc" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="74" pref="74" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jScrollPane2" min="-2" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <EmptySpace min="7" pref="7" max="-2" attributes="0"/> + <Component id="AddBtn" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="83" pref="83" max="-2" attributes="0"/> + <Component id="jPanel3" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="7" pref="7" max="-2" attributes="0"/> + <Component id="ViewBtn" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="105" pref="105" max="-2" attributes="0"/> + <Component id="ResetBtn" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Component id="jLabel13" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="ErrLabel" min="-2" pref="223" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="409" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="19" pref="19" max="-2" attributes="0"/> + <Component id="jLabel27" min="-2" max="-2" attributes="0"/> + <EmptySpace min="6" pref="6" max="-2" attributes="0"/> + <Component id="jSeparator3" min="-2" pref="10" max="-2" attributes="0"/> + <EmptySpace min="15" pref="15" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="4" pref="4" max="-2" attributes="0"/> + <Component id="jLabel28" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="P_id" min="-2" pref="21" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <EmptySpace min="4" pref="4" max="-2" attributes="0"/> + <Component id="jLabel33" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="3" pref="3" max="-2" attributes="0"/> + <Component id="Age" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="19" pref="19" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="6" pref="6" max="-2" attributes="0"/> + <Component id="jLabel29" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="3" pref="3" max="-2" attributes="0"/> + <Component id="Name" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="22" pref="22" max="-2" attributes="0"/> + <Component id="jLabel34" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="Male" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="6" pref="6" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="7" pref="7" max="-2" attributes="0"/> + <Component id="jLabel30" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="3" pref="3" max="-2" attributes="0"/> + <Component id="F_Name" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="Female" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="34" pref="34" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="5" pref="5" max="-2" attributes="0"/> + <Component id="jLabel31" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="2" pref="2" max="-2" attributes="0"/> + <Component id="Email" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="4" pref="4" max="-2" attributes="0"/> + <Component id="jLabel35" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="BldGrp" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="58" pref="58" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="5" pref="5" max="-2" attributes="0"/> + <Component id="jLabel32" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="1" pref="1" max="-2" attributes="0"/> + <Component id="Contact" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="4" pref="4" max="-2" attributes="0"/> + <Component id="jLabel14" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="AlttDoc" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="18" pref="18" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel3" min="-2" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <EmptySpace min="228" pref="228" max="-2" attributes="0"/> + <Component id="ViewBtn" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="23" pref="23" max="-2" attributes="0"/> + <Component id="jLabel13" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="15" max="-2" attributes="0"/> + <Component id="ErrLabel" min="-2" pref="25" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jScrollPane2" min="-2" pref="90" max="-2" attributes="0"/> + <EmptySpace min="33" pref="33" max="-2" attributes="0"/> + <Component id="AddBtn" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="129" max="-2" attributes="0"/> + <Component id="ResetBtn" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel27"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Serif" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Patient Registration"/> + </Properties> + </Component> + <Component class="javax.swing.JSeparator" name="jSeparator3"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel28"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="<html>Patient ID<font color="red">*</font>"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel29"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="<html>Patient Name<font color=red>*</font></html>"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel30"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Father's Name"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel31"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Email"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel32"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="<html>Contact No<font color="red">*</font>"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel33"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Age"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel34"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Gender"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel35"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="<html>Blood Group<font color="red">*</font>"/> + </Properties> + </Component> + <Container class="javax.swing.JPanel" name="jPanel3"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder title="Address"> + <Font PropertyName="font" name="TlwgTypewriter" size="18" style="1"/> + </TitledBorder> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel36" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="2" max="-2" attributes="0"/> + <Component id="jScrollPane4" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel37" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel38" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="27" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="State2" min="-2" max="-2" attributes="0"/> + <Component id="City2" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace pref="36" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel36" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jScrollPane4" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="32" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel37" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="State2" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="44" max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel38" alignment="1" min="-2" max="-2" attributes="0"/> + <Component id="City2" alignment="1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="22" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel36"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="<html>Address<font color="red">*</font>"/> + </Properties> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane4"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="Add2"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="lineWrap" type="boolean" value="true"/> + <Property name="rows" type="int" value="5"/> + <Property name="toolTipText" type="java.lang.String" value="Address"/> + </Properties> + <Events> + <EventHandler event="keyPressed" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="Add2KeyPressed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JLabel" name="jLabel37"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="State"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel38"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="City"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="State2"> + <Properties> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="1"> + <StringItem index="0" value="Maharashtra"/> + </StringArray> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="State2FocusGained"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JComboBox" name="City2"> + <Properties> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="7"> + <StringItem index="0" value="Pune"/> + <StringItem index="1" value="Karad"/> + <StringItem index="2" value="Satara"/> + <StringItem index="3" value="Sangli"/> + <StringItem index="4" value="Kolhapur"/> + <StringItem index="5" value="Islampur"/> + <StringItem index="6" value="Mumbai"/> + </StringArray> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JLabel" name="jLabel13"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Remarks"/> + </Properties> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane2"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="Remarks"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="lineWrap" type="boolean" value="true"/> + <Property name="rows" type="int" value="5"/> + <Property name="text" type="java.lang.String" value="Remarks if any"/> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="RemarksFocusGained"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JTextField" name="Name"> + </Component> + <Component class="javax.swing.JTextField" name="F_Name"> + </Component> + <Component class="javax.swing.JTextField" name="Email"> + <Events> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="EmailFocusLost"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="Contact"> + <Events> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="ContactFocusLost"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="Age"> + </Component> + <Component class="javax.swing.JRadioButton" name="Male"> + <Properties> + <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> + <ComponentRef name="buttonGroup2"/> + </Property> + <Property name="text" type="java.lang.String" value="Male"/> + </Properties> + </Component> + <Component class="javax.swing.JRadioButton" name="Female"> + <Properties> + <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> + <ComponentRef name="buttonGroup2"/> + </Property> + <Property name="selected" type="boolean" value="true"/> + <Property name="text" type="java.lang.String" value="Female"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="FemaleActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="AddBtn"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Add"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="AddBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JComboBox" name="BldGrp"> + <Properties> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="8"> + <StringItem index="0" value="A+"/> + <StringItem index="1" value="A-"/> + <StringItem index="2" value="B+"/> + <StringItem index="3" value="B-"/> + <StringItem index="4" value="O+"/> + <StringItem index="5" value="O-"/> + <StringItem index="6" value="AB+"/> + <StringItem index="7" value="AB-"/> + </StringArray> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="ResetBtn"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Reset"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="ResetBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="ViewBtn"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="VIew"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="ViewBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel14"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Doctor"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="AlttDoc"> + <Properties> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="3"> + <StringItem index="0" value="Dr. Mihir"/> + <StringItem index="1" value="Dr. Nachiket"/> + <StringItem index="2" value="Dr. Neha"/> + </StringArray> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="ErrLabel"> + </Component> + <Component class="javax.swing.JLabel" name="P_id"> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel6"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="DOCTOR"> + <Property name="tabTitle" type="java.lang.String" value="DOCTOR"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jLabel45" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="txtQ" min="-2" pref="109" max="-2" attributes="0"/> + </Group> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel41" alignment="1" min="-2" max="-2" attributes="0"/> + <Component id="jLabel42" min="-2" max="-2" attributes="0"/> + <Component id="Add_Doc" alignment="1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="txtFname" min="-2" pref="109" max="-2" attributes="0"/> + <Component id="txtE" min="-2" pref="109" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="1" max="-2" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel40" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel39" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> + </Group> + <Component id="jLabel43" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="117" max="-2" attributes="0"/> + <Component id="txtC" min="-2" pref="109" max="-2" attributes="0"/> + </Group> + <Component id="txtName" alignment="1" min="-2" pref="109" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="-2" pref="45" max="-2" attributes="0"/> + <Component id="jButton1" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="265" max="-2" attributes="0"/> + <Component id="ErrLabel1" min="-2" pref="223" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace max="32767" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jSeparator4" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jLabel51" min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="48" max="-2" attributes="0"/> + <Component id="jDateChooser1" min="-2" pref="193" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="83" max="-2" attributes="0"/> + <Component id="ResetBtnD" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="-2" pref="228" max="-2" attributes="0"/> + <Component id="txtId" min="-2" pref="131" max="-2" attributes="0"/> + <EmptySpace pref="139" max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel46" min="-2" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <Component id="jLabel47" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="68" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="BldGrp1" min="-2" max="-2" attributes="0"/> + <Component id="FemaleD" min="-2" max="-2" attributes="0"/> + <Component id="MaleD" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel44" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="jScrollPane5" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + <EmptySpace min="-2" pref="33" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + <Component id="jLabel52" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="302" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="-2" pref="15" max="-2" attributes="0"/> + <Component id="jLabel52" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="39" max="-2" attributes="0"/> + <Component id="jSeparator4" min="-2" pref="14" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="33" max="-2" attributes="0"/> + <Component id="FemaleD" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="MaleD" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="26" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel39" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel46" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="txtId" alignment="3" min="-2" pref="31" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="40" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel40" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="txtName" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel47" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="BldGrp1" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="12" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel41" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="txtFname" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="40" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel42" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="txtE" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="40" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel43" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="txtC" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jScrollPane5" min="-2" pref="105" max="-2" attributes="0"/> + <Component id="jLabel44" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace min="-2" pref="36" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="txtQ" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel45" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel51" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="jDateChooser1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + <Component id="ErrLabel1" min="-2" pref="25" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="35" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="Add_Doc" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="ResetBtnD" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="65" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel39"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="<html>Doctor ID<font color="red">*</font>"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel40"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="<html>Full Name<font color="red">*</font>"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel41"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Father's / Husband's Name"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel42"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="<html>Email-id<font color="red">*</font>"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel43"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="<html>Contact no<font color="red">*</font>"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel44"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="<html>Address<font color="red">*</font>"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel45"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Qualifications"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel46"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Gender"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel47"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Blood Group"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel51"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="<html><font>Date Of Joining<font color="red">*</font></html>"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txtName"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JTextField" name="txtFname"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JTextField" name="txtE"> + <Events> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="txtEFocusLost"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JTextField" name="txtC"> + <Events> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="txtCFocusLost"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txtCActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JTextField" name="txtQ"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane5"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="AddArea"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + <Property name="toolTipText" type="java.lang.String" value="Address"/> + </Properties> + </Component> + </SubComponents> + </Container> + <Component class="com.toedter.calendar.JDateChooser" name="jDateChooser1"> + <Properties> + <Property name="toolTipText" type="java.lang.String" value=""/> + </Properties> + </Component> + <Component class="javax.swing.JRadioButton" name="FemaleD"> + <Properties> + <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> + <ComponentRef name="buttonGroup1"/> + </Property> + <Property name="text" type="java.lang.String" value="Female"/> + </Properties> + </Component> + <Component class="javax.swing.JButton" name="Add_Doc"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Add Doctor"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="Add_DocActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JRadioButton" name="MaleD"> + <Properties> + <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> + <ComponentRef name="buttonGroup1"/> + </Property> + <Property name="selected" type="boolean" value="true"/> + <Property name="text" type="java.lang.String" value="Male"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="BldGrp1"> + <Properties> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="8"> + <StringItem index="0" value="A+"/> + <StringItem index="1" value="A-"/> + <StringItem index="2" value="B+"/> + <StringItem index="3" value="B-"/> + <StringItem index="4" value="O+"/> + <StringItem index="5" value="O-"/> + <StringItem index="6" value="AB+"/> + <StringItem index="7" value="AB-"/> + </StringArray> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JSeparator" name="jSeparator4"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel52"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Serif" size="18" style="1"/> + </Property> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="Doctor Registration"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="ErrLabel1"> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="View"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="ResetBtnD"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Reset"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="ResetBtnDActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="txtId"> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel1"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="PANCHAKARMA"> + <Property name="tabTitle" type="java.lang.String" value="PANCHAKARMA"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="108" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="36" max="-2" attributes="0"/> + <Component id="jScrollPane1" min="-2" pref="289" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="jButton2" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="114" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="52" max="-2" attributes="0"/> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="36" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + <Component id="jScrollPane1" min="-2" pref="145" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="21" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Component id="jButton2" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="89" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel2"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder title="Treatments"> + <Font PropertyName="font" name="TlwgTypewriter" size="18" style="1"/> + </TitledBorder> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel7" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel8" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="53" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jComboBox3" pref="147" max="32767" attributes="0"/> + <Component id="jComboBox4" max="32767" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel6" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="56" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jComboBox1" min="-2" pref="224" max="-2" attributes="0"/> + <Component id="jComboBox2" min="-2" pref="341" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace pref="111" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="22" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jComboBox1" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="68" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jComboBox2" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="68" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jComboBox3" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="68" max="32767" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jComboBox4" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="68" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel5"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Panchakarma"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Special"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBox1"> + <Properties> + <Property name="maximumRowCount" type="int" value="4"/> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JComboBox<>(new SortedComboBoxModel(this.panch))"/> + <AuxValue name="JavaCodeGenerator_InitCodePost" type="java.lang.String" value="jComboBox1.setSelectedItem("None");"/> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBox2"> + <Properties> + <Property name="maximumRowCount" type="int" value="4"/> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> + <SerializedValue value="-84,-19,0,5,115,114,0,78,111,114,103,46,110,101,116,98,101,97,110,115,46,109,111,100,117,108,101,115,46,102,111,114,109,46,82,65,68,67,111,110,110,101,99,116,105,111,110,80,114,111,112,101,114,116,121,69,100,105,116,111,114,36,82,65,68,67,111,110,110,101,99,116,105,111,110,68,101,115,105,103,110,86,97,108,117,101,2,10,-70,90,-35,-97,-57,100,2,0,7,73,0,4,116,121,112,101,76,0,10,109,101,116,104,111,100,78,97,109,101,116,0,18,76,106,97,118,97,47,108,97,110,103,47,83,116,114,105,110,103,59,76,0,12,112,114,111,112,101,114,116,121,78,97,109,101,113,0,126,0,1,76,0,16,114,97,100,67,111,109,112,111,110,101,110,116,78,97,109,101,113,0,126,0,1,76,0,16,114,101,113,117,105,114,101,100,84,121,112,101,78,97,109,101,113,0,126,0,1,76,0,8,117,115,101,114,67,111,100,101,113,0,126,0,1,76,0,5,118,97,108,117,101,113,0,126,0,1,120,112,0,0,0,2,112,112,112,112,116,0,0,112"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value=""/> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JComboBox<>(new SortedComboBoxModel(this.spec))"/> + <AuxValue name="JavaCodeGenerator_InitCodePost" type="java.lang.String" value="jComboBox2.setSelectedItem("None");"/> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="jLabel7"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Panchakarma Therapies"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBox3"> + <Properties> + <Property name="maximumRowCount" type="int" value="4"/> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> + <SerializedValue value="-84,-19,0,5,115,114,0,78,111,114,103,46,110,101,116,98,101,97,110,115,46,109,111,100,117,108,101,115,46,102,111,114,109,46,82,65,68,67,111,110,110,101,99,116,105,111,110,80,114,111,112,101,114,116,121,69,100,105,116,111,114,36,82,65,68,67,111,110,110,101,99,116,105,111,110,68,101,115,105,103,110,86,97,108,117,101,2,10,-70,90,-35,-97,-57,100,2,0,7,73,0,4,116,121,112,101,76,0,10,109,101,116,104,111,100,78,97,109,101,116,0,18,76,106,97,118,97,47,108,97,110,103,47,83,116,114,105,110,103,59,76,0,12,112,114,111,112,101,114,116,121,78,97,109,101,113,0,126,0,1,76,0,16,114,97,100,67,111,109,112,111,110,101,110,116,78,97,109,101,113,0,126,0,1,76,0,16,114,101,113,117,105,114,101,100,84,121,112,101,78,97,109,101,113,0,126,0,1,76,0,8,117,115,101,114,67,111,100,101,113,0,126,0,1,76,0,5,118,97,108,117,101,113,0,126,0,1,120,112,0,0,0,2,112,112,112,112,116,0,0,112"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Default Cursor"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JComboBox<>(new SortedComboBoxModel(this.pt))"/> + <AuxValue name="JavaCodeGenerator_InitCodePost" type="java.lang.String" value="jComboBox3.setSelectedItem("None");"/> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="jLabel8"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Kerela Treatments"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBox4"> + <Properties> + <Property name="maximumRowCount" type="int" value="4"/> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> + <SerializedValue value="-84,-19,0,5,115,114,0,78,111,114,103,46,110,101,116,98,101,97,110,115,46,109,111,100,117,108,101,115,46,102,111,114,109,46,82,65,68,67,111,110,110,101,99,116,105,111,110,80,114,111,112,101,114,116,121,69,100,105,116,111,114,36,82,65,68,67,111,110,110,101,99,116,105,111,110,68,101,115,105,103,110,86,97,108,117,101,2,10,-70,90,-35,-97,-57,100,2,0,7,73,0,4,116,121,112,101,76,0,10,109,101,116,104,111,100,78,97,109,101,116,0,18,76,106,97,118,97,47,108,97,110,103,47,83,116,114,105,110,103,59,76,0,12,112,114,111,112,101,114,116,121,78,97,109,101,113,0,126,0,1,76,0,16,114,97,100,67,111,109,112,111,110,101,110,116,78,97,109,101,113,0,126,0,1,76,0,16,114,101,113,117,105,114,101,100,84,121,112,101,78,97,109,101,113,0,126,0,1,76,0,8,117,115,101,114,67,111,100,101,113,0,126,0,1,76,0,5,118,97,108,117,101,113,0,126,0,1,120,112,0,0,0,2,112,112,112,112,116,0,0,112"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JComboBox<>(new SortedComboBoxModel(this.kt))"/> + <AuxValue name="JavaCodeGenerator_InitCodePost" type="java.lang.String" value="jComboBox4.setSelectedItem("None");"/> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Selected Treatments"/> + </Properties> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="jTextArea1"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jTextArea1FocusGained"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Confirm"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel4"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_AddingCodePost" type="java.lang.String" value="jTabbedPane4.setEnabledAt(3, false);"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="MEDICINES"> + <Property name="tabTitle" type="java.lang.String" value="MEDICINES"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="73" max="-2" attributes="0"/> + <Component id="jPanel5" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="283" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Component id="GenBillBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="57" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> + <Component id="GenBillBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jPanel5" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="178" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel5"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder title="Medicines"> + <Font PropertyName="font" name="TlwgTypewriter" size="18" style="1"/> + </TitledBorder> + </Border> + </Property> + </Properties> + <AccessibilityProperties> + <Property name="AccessibleContext.accessibleName" type="java.lang.String" value=""/> + </AccessibilityProperties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="15" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel2" min="-2" pref="146" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="84" max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jComboBox5" alignment="1" min="-2" pref="200" max="-2" attributes="0"/> + <Component id="jComboBox6" alignment="1" min="-2" pref="200" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="40" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="41" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jComboBox5" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="72" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jComboBox6" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="262" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Prepared Meds"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBox5"> + <Properties> + <Property name="maximumRowCount" type="int" value="4"/> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> + <SerializedValue value="-84,-19,0,5,115,114,0,78,111,114,103,46,110,101,116,98,101,97,110,115,46,109,111,100,117,108,101,115,46,102,111,114,109,46,82,65,68,67,111,110,110,101,99,116,105,111,110,80,114,111,112,101,114,116,121,69,100,105,116,111,114,36,82,65,68,67,111,110,110,101,99,116,105,111,110,68,101,115,105,103,110,86,97,108,117,101,2,10,-70,90,-35,-97,-57,100,2,0,7,73,0,4,116,121,112,101,76,0,10,109,101,116,104,111,100,78,97,109,101,116,0,18,76,106,97,118,97,47,108,97,110,103,47,83,116,114,105,110,103,59,76,0,12,112,114,111,112,101,114,116,121,78,97,109,101,113,0,126,0,1,76,0,16,114,97,100,67,111,109,112,111,110,101,110,116,78,97,109,101,113,0,126,0,1,76,0,16,114,101,113,117,105,114,101,100,84,121,112,101,78,97,109,101,113,0,126,0,1,76,0,8,117,115,101,114,67,111,100,101,113,0,126,0,1,76,0,5,118,97,108,117,101,113,0,126,0,1,120,112,0,0,0,2,112,112,112,112,116,0,0,112"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JComboBox<>(new SortedComboBoxModel(this.prepm))"/> + <AuxValue name="JavaCodeGenerator_InitCodePost" type="java.lang.String" value="jComboBox5.setSelectedItem("None");"/> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Imported"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBox6"> + <Properties> + <Property name="maximumRowCount" type="int" value="4"/> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> + <SerializedValue value="-84,-19,0,5,115,114,0,78,111,114,103,46,110,101,116,98,101,97,110,115,46,109,111,100,117,108,101,115,46,102,111,114,109,46,82,65,68,67,111,110,110,101,99,116,105,111,110,80,114,111,112,101,114,116,121,69,100,105,116,111,114,36,82,65,68,67,111,110,110,101,99,116,105,111,110,68,101,115,105,103,110,86,97,108,117,101,2,10,-70,90,-35,-97,-57,100,2,0,7,73,0,4,116,121,112,101,76,0,10,109,101,116,104,111,100,78,97,109,101,116,0,18,76,106,97,118,97,47,108,97,110,103,47,83,116,114,105,110,103,59,76,0,12,112,114,111,112,101,114,116,121,78,97,109,101,113,0,126,0,1,76,0,16,114,97,100,67,111,109,112,111,110,101,110,116,78,97,109,101,113,0,126,0,1,76,0,16,114,101,113,117,105,114,101,100,84,121,112,101,78,97,109,101,113,0,126,0,1,76,0,8,117,115,101,114,67,111,100,101,113,0,126,0,1,76,0,5,118,97,108,117,101,113,0,126,0,1,120,112,0,0,0,2,112,112,112,112,116,0,0,112"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JComboBox<>(new SortedComboBoxModel(this.prop))"/> + <AuxValue name="JavaCodeGenerator_InitCodePost" type="java.lang.String" value="jComboBox6.setSelectedItem("None");"/> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="GenBillBtn"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Generate Bill"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="GenBillBtnActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="LogoutBtn"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Logout"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="LogoutBtnActionPerformed"/> + </Events> + </Component> + </SubComponents> +</Form> diff --git a/src/com/sdtssp/hospitalUI/Menu.java b/src/com/sdtssp/hospitalUI/Menu.java new file mode 100644 index 0000000..b048740 --- /dev/null +++ b/src/com/sdtssp/hospitalUI/Menu.java @@ -0,0 +1,1349 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.sdtssp.hospitalUI; + +import com.sdtssp.DBConnect; +import com.sdtssp.SortedComboBoxModel; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import com.sdtssp.Validators; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Random; +import javax.swing.ImageIcon; +import javax.swing.JFrame; +import javax.swing.JOptionPane; +import java.awt.Color; +import java.sql.SQLException; +import java.util.Arrays; +import java.util.logging.Level; +import java.util.logging.Logger; +/** + * + * @author nilesh + */ +public class Menu extends javax.swing.JFrame{ + Validators v; + Statement stmt = null; + Connection con = null; + ResultSet rs = null; + String [] spec = { "None", "SUKHAYU ANTICANCER THERAPY (SAT)", "PANCHAVED UNIQUE TREATMENT FOR VARICOSE VEINS" }; + String [] panch = { "None", "Relaxation Course (3-21 days)", "Sinus Care Course (7-14days)", "Spine Care Course (7-14 days)", "Joint Care Course (5-21 days)", "Slimming Course (14-45 days)", "Panchved Wellness Course (3-5 days)" }; + String [] pt = { "None", "SNEHAN", "ABHYANG", "SWEDAN", "VAMAN", "VIRECHAN", "NASYAM", "RAKTAMOKSHAN" }; + String [] kt = { "None", "PIZHICHIL", "NAVARKIZHI", "SHIRODHARA", "UDWARTANAM", "KATIBASTI", "HRUDAYBASTI", "GREEVABASTI", "THALAM", "LEPANAM", "PATRA POTTALI" }; + String [] prepm = { "None", "Churna", "Bharad", "Bhasma", "Guti/Vati", "Rasakalpa", "Capsules", "Aasav", "Arishta", "Oil", "Ghrut", "Lep", "Mixtures" }; + String [] prop = {"None", "Churna", "Bhasma","Sukshma Aushadhi","Syrup","Lotion","Cream","Ointment","Lintment","Oil","Eye-Drops","Ear-Drops","Lep", "Capsules", "Aasav", "Arishta","Tablets","Others"}; + /* + ** + * Creates new form Menu + */ + public Menu() { + v = new Validators(); + con = DBConnect.Connect(); + setExtendedState(getExtendedState() | JFrame.MAXIMIZED_BOTH); + getContentPane().setBackground(Color.getHSBColor(1, 1, 0.38f)); + initComponents(); + generateID(); + } + + public void generateID(){ + + try { + String patid = Integer.toString(new Random().nextInt(51)+1); + String docid = Integer.toString(new Random().nextInt(5)+1); + Statement stmt1 = con.createStatement(); + Statement stmt2 = con.createStatement(); + P_id.setText(patid); + //System.out.println(patid); + txtId.setText(docid); + String sqlpat = "select PatientID from patientreg;"; + String sqldoc = "select DoctorID from doctor;"; + ResultSet pat , doc; + + pat = stmt1.executeQuery(sqlpat); + doc = stmt2.executeQuery(sqldoc); +// System.out.println(pat.getInt("PatientID")); + while(pat.next()){ + + if(pat.getInt(1) == Integer.parseInt(patid)) + { + generateID(); + break; + } + } + while(doc.next()){ + if(doc.getInt(1) == Integer.parseInt(docid)) + { + generateID(); + break; + } + } + } catch (SQLException ex) { + Logger.getLogger(Menu.class.getName()).log(Level.SEVERE, null, ex); + } + + } + + public void resetF() { + txtName.setText(""); + txtFname.setText(""); + txtId.setText(""); + txtC.setText(""); + txtE.setText(""); + txtQ.setText(""); + AddArea.setText(""); + Date date = new Date(); + jDateChooser1.setDate(date); + P_id.setText(""); + Name.setText(""); + F_Name.setText(""); + Age.setText(""); + Email.setText(""); + Contact.setText(""); + Remarks.setText("Remarks if any"); + Add2.setText(""); + generateID(); + } + + public boolean manFields(String s) + { + int flag = 1; + if(s.equals("Doc")){ + if (txtId.getText().equals("") || txtName.getText().equals("") || txtC.getText().equals("") || AddArea.getText().equals("") || BldGrp1.getSelectedItem() == null || jDateChooser1.getDate() == null) + flag = 0; + } + else + if (Name.getText().equals("") || P_id.getText().equals("") || Contact.getText().equals("") || Add2.getText().equals("") || BldGrp.getSelectedItem() == null) + flag = 0; + + if(flag == 0) + { + JOptionPane.showMessageDialog(rootPane,"(*)Fields cannot be Empty","Error", 1); + return false; + } + return true; + } + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + buttonGroup1 = new javax.swing.ButtonGroup(); + buttonGroup2 = new javax.swing.ButtonGroup(); + jTabbedPane4 = new javax.swing.JTabbedPane(); + jPanel8 = new javax.swing.JPanel(); + jLabel27 = new javax.swing.JLabel(); + jSeparator3 = new javax.swing.JSeparator(); + jLabel28 = new javax.swing.JLabel(); + jLabel29 = new javax.swing.JLabel(); + jLabel30 = new javax.swing.JLabel(); + jLabel31 = new javax.swing.JLabel(); + jLabel32 = new javax.swing.JLabel(); + jLabel33 = new javax.swing.JLabel(); + jLabel34 = new javax.swing.JLabel(); + jLabel35 = new javax.swing.JLabel(); + jPanel3 = new javax.swing.JPanel(); + jLabel36 = new javax.swing.JLabel(); + jScrollPane4 = new javax.swing.JScrollPane(); + Add2 = new javax.swing.JTextArea(); + jLabel37 = new javax.swing.JLabel(); + jLabel38 = new javax.swing.JLabel(); + State2 = new javax.swing.JComboBox<>(); + City2 = new javax.swing.JComboBox<>(); + jLabel13 = new javax.swing.JLabel(); + jScrollPane2 = new javax.swing.JScrollPane(); + Remarks = new javax.swing.JTextArea(); + Name = new javax.swing.JTextField(); + F_Name = new javax.swing.JTextField(); + Email = new javax.swing.JTextField(); + Contact = new javax.swing.JTextField(); + Age = new javax.swing.JTextField(); + Male = new javax.swing.JRadioButton(); + Female = new javax.swing.JRadioButton(); + AddBtn = new javax.swing.JButton(); + BldGrp = new javax.swing.JComboBox<>(); + ResetBtn = new javax.swing.JButton(); + ViewBtn = new javax.swing.JButton(); + jLabel14 = new javax.swing.JLabel(); + AlttDoc = new javax.swing.JComboBox<>(); + ErrLabel = new javax.swing.JLabel(); + P_id = new javax.swing.JLabel(); + jPanel6 = new javax.swing.JPanel(); + jLabel39 = new javax.swing.JLabel(); + jLabel40 = new javax.swing.JLabel(); + jLabel41 = new javax.swing.JLabel(); + jLabel42 = new javax.swing.JLabel(); + jLabel43 = new javax.swing.JLabel(); + jLabel44 = new javax.swing.JLabel(); + jLabel45 = new javax.swing.JLabel(); + jLabel46 = new javax.swing.JLabel(); + jLabel47 = new javax.swing.JLabel(); + jLabel51 = new javax.swing.JLabel(); + txtName = new javax.swing.JTextField(); + txtFname = new javax.swing.JTextField(); + txtE = new javax.swing.JTextField(); + txtC = new javax.swing.JTextField(); + txtQ = new javax.swing.JTextField(); + jScrollPane5 = new javax.swing.JScrollPane(); + AddArea = new javax.swing.JTextArea(); + jDateChooser1 = new com.toedter.calendar.JDateChooser(); + FemaleD = new javax.swing.JRadioButton(); + Add_Doc = new javax.swing.JButton(); + MaleD = new javax.swing.JRadioButton(); + BldGrp1 = new javax.swing.JComboBox<>(); + jSeparator4 = new javax.swing.JSeparator(); + jLabel52 = new javax.swing.JLabel(); + ErrLabel1 = new javax.swing.JLabel(); + jButton1 = new javax.swing.JButton(); + ResetBtnD = new javax.swing.JButton(); + txtId = new javax.swing.JLabel(); + jPanel1 = new javax.swing.JPanel(); + jPanel2 = new javax.swing.JPanel(); + jLabel5 = new javax.swing.JLabel(); + jLabel6 = new javax.swing.JLabel(); + jComboBox1 = new javax.swing.JComboBox<>(new SortedComboBoxModel(this.panch)); + jComboBox2 = new javax.swing.JComboBox<>(new SortedComboBoxModel(this.spec)); + jLabel7 = new javax.swing.JLabel(); + jComboBox3 = new javax.swing.JComboBox<>(new SortedComboBoxModel(this.pt)); + jLabel8 = new javax.swing.JLabel(); + jComboBox4 = new javax.swing.JComboBox<>(new SortedComboBoxModel(this.kt)); + jLabel1 = new javax.swing.JLabel(); + jScrollPane1 = new javax.swing.JScrollPane(); + jTextArea1 = new javax.swing.JTextArea(); + jButton2 = new javax.swing.JButton(); + jPanel4 = new javax.swing.JPanel(); + jPanel5 = new javax.swing.JPanel(); + jLabel2 = new javax.swing.JLabel(); + jComboBox5 = new javax.swing.JComboBox<>(new SortedComboBoxModel(this.prepm)); + jLabel3 = new javax.swing.JLabel(); + jComboBox6 = new javax.swing.JComboBox<>(new SortedComboBoxModel(this.prop)); + GenBillBtn = new javax.swing.JButton(); + LogoutBtn = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("Main Menu"); + setBackground(Color.RED); + + jTabbedPane4.setFont(new java.awt.Font("Chilanka", 2, 24)); // NOI18N + + jPanel8.setMaximumSize(new java.awt.Dimension(32767, 32000)); + jPanel8.setPreferredSize(new java.awt.Dimension(851, 620)); + + jLabel27.setFont(new java.awt.Font("Serif", 1, 18)); // NOI18N + jLabel27.setText("Patient Registration"); + + jLabel28.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel28.setText("<html>Patient ID<font color=\"red\">*</font>"); + + jLabel29.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel29.setText("<html>Patient Name<font color=red>*</font></html>"); + + jLabel30.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel30.setText("Father's Name"); + + jLabel31.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel31.setText("Email"); + + jLabel32.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel32.setText("<html>Contact No<font color=\"red\">*</font>"); + + jLabel33.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel33.setText("Age"); + + jLabel34.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel34.setText("Gender"); + + jLabel35.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel35.setText("<html>Blood Group<font color=\"red\">*</font>"); + + jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Address", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("TlwgTypewriter", 1, 18))); // NOI18N + + jLabel36.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel36.setText("<html>Address<font color=\"red\">*</font>"); + + Add2.setColumns(20); + Add2.setLineWrap(true); + Add2.setRows(5); + Add2.setToolTipText("Address"); + Add2.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyPressed(java.awt.event.KeyEvent evt) { + Add2KeyPressed(evt); + } + }); + jScrollPane4.setViewportView(Add2); + + jLabel37.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel37.setText("State"); + + jLabel38.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel38.setText("City"); + + State2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Maharashtra" })); + State2.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + State2FocusGained(evt); + } + }); + + City2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Pune", "Karad", "Satara", "Sangli", "Kolhapur", "Islampur", "Mumbai" })); + + javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); + jPanel3.setLayout(jPanel3Layout); + jPanel3Layout.setHorizontalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addComponent(jLabel36, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(2, 2, 2) + .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel3Layout.createSequentialGroup() + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel37) + .addComponent(jLabel38)) + .addGap(27, 27, 27) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(State2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(City2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) + .addContainerGap(36, Short.MAX_VALUE)) + ); + jPanel3Layout.setVerticalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel36, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(32, 32, 32) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel37) + .addComponent(State2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 44, Short.MAX_VALUE) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel38, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(City2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(22, 22, 22)) + ); + + jLabel13.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel13.setText("Remarks"); + + Remarks.setColumns(20); + Remarks.setLineWrap(true); + Remarks.setRows(5); + Remarks.setText("Remarks if any"); + Remarks.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + RemarksFocusGained(evt); + } + }); + jScrollPane2.setViewportView(Remarks); + + Email.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusLost(java.awt.event.FocusEvent evt) { + EmailFocusLost(evt); + } + }); + + Contact.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusLost(java.awt.event.FocusEvent evt) { + ContactFocusLost(evt); + } + }); + + buttonGroup2.add(Male); + Male.setText("Male"); + + buttonGroup2.add(Female); + Female.setSelected(true); + Female.setText("Female"); + Female.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + FemaleActionPerformed(evt); + } + }); + + AddBtn.setFont(new java.awt.Font("Chilanka", 1, 18)); // NOI18N + AddBtn.setText("Add"); + AddBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + AddBtnActionPerformed(evt); + } + }); + + BldGrp.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "A+", "A-", "B+", "B-", "O+", "O-", "AB+", "AB-" })); + + ResetBtn.setFont(new java.awt.Font("Chilanka", 1, 18)); // NOI18N + ResetBtn.setText("Reset"); + ResetBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + ResetBtnActionPerformed(evt); + } + }); + + ViewBtn.setFont(new java.awt.Font("Chilanka", 1, 18)); // NOI18N + ViewBtn.setText("VIew"); + ViewBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + ViewBtnActionPerformed(evt); + } + }); + + jLabel14.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel14.setText("Doctor"); + + AlttDoc.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Dr. Mihir", "Dr. Nachiket", "Dr. Neha" })); + + javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8); + jPanel8.setLayout(jPanel8Layout); + jPanel8Layout.setHorizontalGroup( + jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(297, 297, 297) + .addComponent(jLabel27)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(6, 6, 6) + .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 829, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(74, 74, 74) + .addComponent(jLabel28, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(75, 75, 75) + .addComponent(P_id, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(110, 110, 110) + .addComponent(jLabel33) + .addGap(82, 82, 82) + .addComponent(Age, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(74, 74, 74) + .addComponent(jLabel29, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(46, 46, 46) + .addComponent(Name, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(110, 110, 110) + .addComponent(jLabel34) + .addGap(86, 86, 86) + .addComponent(Male)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(74, 74, 74) + .addComponent(jLabel30) + .addGap(44, 44, 44) + .addComponent(F_Name, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(238, 238, 238) + .addComponent(Female)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(74, 74, 74) + .addComponent(jLabel31) + .addGap(117, 117, 117) + .addComponent(Email, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(110, 110, 110) + .addComponent(jLabel35, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(56, 56, 56) + .addComponent(BldGrp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(74, 74, 74) + .addComponent(jLabel32, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(63, 63, 63) + .addComponent(Contact, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(110, 110, 110) + .addComponent(jLabel14) + .addGap(50, 50, 50) + .addComponent(AlttDoc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(74, 74, 74) + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(7, 7, 7) + .addComponent(AddBtn))) + .addGap(83, 83, 83) + .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(7, 7, 7) + .addComponent(ViewBtn)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(105, 105, 105) + .addComponent(ResetBtn)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addComponent(jLabel13) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(ErrLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 223, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(409, 409, 409)))) + ); + jPanel8Layout.setVerticalGroup( + jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(19, 19, 19) + .addComponent(jLabel27) + .addGap(6, 6, 6) + .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(15, 15, 15) + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(4, 4, 4) + .addComponent(jLabel28, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(P_id, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(4, 4, 4) + .addComponent(jLabel33)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(3, 3, 3) + .addComponent(Age, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGap(19, 19, 19) + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(6, 6, 6) + .addComponent(jLabel29, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(3, 3, 3) + .addComponent(Name, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(22, 22, 22) + .addComponent(jLabel34)) + .addComponent(Male)) + .addGap(6, 6, 6) + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(7, 7, 7) + .addComponent(jLabel30)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(3, 3, 3) + .addComponent(F_Name, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(Female)) + .addGap(34, 34, 34) + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(5, 5, 5) + .addComponent(jLabel31)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(2, 2, 2) + .addComponent(Email, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(4, 4, 4) + .addComponent(jLabel35, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(BldGrp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(58, 58, 58) + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(5, 5, 5) + .addComponent(jLabel32, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(1, 1, 1) + .addComponent(Contact, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(4, 4, 4) + .addComponent(jLabel14)) + .addComponent(AlttDoc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(228, 228, 228) + .addComponent(ViewBtn)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(23, 23, 23) + .addComponent(jLabel13)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(15, 15, 15) + .addComponent(ErrLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel8Layout.createSequentialGroup() + .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(33, 33, 33) + .addComponent(AddBtn)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(129, 129, 129) + .addComponent(ResetBtn)))))) + ); + + jTabbedPane4.addTab("PATIENT", jPanel8); + + jLabel39.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel39.setText("<html>Doctor ID<font color=\"red\">*</font>"); + + jLabel40.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel40.setText("<html>Full Name<font color=\"red\">*</font>"); + + jLabel41.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel41.setText("Father's / Husband's Name"); + + jLabel42.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel42.setText("<html>Email-id<font color=\"red\">*</font>"); + + jLabel43.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel43.setText("<html>Contact no<font color=\"red\">*</font>"); + + jLabel44.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel44.setText("<html>Address<font color=\"red\">*</font>"); + + jLabel45.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel45.setText("Qualifications"); + + jLabel46.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel46.setText("Gender"); + + jLabel47.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel47.setText("Blood Group"); + + jLabel51.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel51.setText("<html><font>Date Of Joining<font color=\"red\">*</font></html>"); + + txtE.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusLost(java.awt.event.FocusEvent evt) { + txtEFocusLost(evt); + } + }); + + txtC.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusLost(java.awt.event.FocusEvent evt) { + txtCFocusLost(evt); + } + }); + txtC.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtCActionPerformed(evt); + } + }); + + AddArea.setColumns(20); + AddArea.setRows(5); + AddArea.setToolTipText("Address"); + jScrollPane5.setViewportView(AddArea); + + jDateChooser1.setToolTipText(""); + + buttonGroup1.add(FemaleD); + FemaleD.setText("Female"); + + Add_Doc.setFont(new java.awt.Font("Chilanka", 1, 18)); // NOI18N + Add_Doc.setText("Add Doctor"); + Add_Doc.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + Add_DocActionPerformed(evt); + } + }); + + buttonGroup1.add(MaleD); + MaleD.setSelected(true); + MaleD.setText("Male"); + + BldGrp1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "A+", "A-", "B+", "B-", "O+", "O-", "AB+", "AB-" })); + + jLabel52.setFont(new java.awt.Font("Serif", 1, 18)); // NOI18N + jLabel52.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel52.setText("Doctor Registration"); + + jButton1.setFont(new java.awt.Font("Chilanka", 1, 18)); // NOI18N + jButton1.setText("View"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + + ResetBtnD.setFont(new java.awt.Font("Chilanka", 1, 18)); // NOI18N + ResetBtnD.setText("Reset"); + ResetBtnD.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + ResetBtnDActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6); + jPanel6.setLayout(jPanel6Layout); + jPanel6Layout.setHorizontalGroup( + jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel6Layout.createSequentialGroup() + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel6Layout.createSequentialGroup() + .addGap(28, 28, 28) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(jPanel6Layout.createSequentialGroup() + .addComponent(jLabel45) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(txtQ, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel6Layout.createSequentialGroup() + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel41, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jLabel42, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(Add_Doc, javax.swing.GroupLayout.Alignment.TRAILING)) + .addGap(18, 18, 18) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(txtFname, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(txtE, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(jPanel6Layout.createSequentialGroup() + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addGroup(jPanel6Layout.createSequentialGroup() + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel40, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel39, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(28, 28, 28)) + .addComponent(jLabel43, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(117, 117, 117) + .addComponent(txtC, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(txtName, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGap(45, 45, 45) + .addComponent(jButton1)) + .addGroup(jPanel6Layout.createSequentialGroup() + .addGap(265, 265, 265) + .addComponent(ErrLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 223, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(jPanel6Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel6Layout.createSequentialGroup() + .addComponent(jSeparator4) + .addContainerGap()) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup() + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(jPanel6Layout.createSequentialGroup() + .addComponent(jLabel51, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel6Layout.createSequentialGroup() + .addGap(48, 48, 48) + .addComponent(jDateChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, 193, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel6Layout.createSequentialGroup() + .addGap(83, 83, 83) + .addComponent(ResetBtnD)))) + .addGroup(jPanel6Layout.createSequentialGroup() + .addGap(228, 228, 228) + .addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 139, Short.MAX_VALUE) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel46) + .addGroup(jPanel6Layout.createSequentialGroup() + .addComponent(jLabel47) + .addGap(68, 68, 68) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(BldGrp1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(FemaleD) + .addComponent(MaleD))) + .addGroup(jPanel6Layout.createSequentialGroup() + .addComponent(jLabel44, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))) + .addGap(33, 33, 33)))) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(jLabel52) + .addGap(302, 302, 302)) + ); + jPanel6Layout.setVerticalGroup( + jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup() + .addGap(15, 15, 15) + .addComponent(jLabel52) + .addGap(39, 39, 39) + .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel6Layout.createSequentialGroup() + .addGap(33, 33, 33) + .addComponent(FemaleD) + .addGap(18, 18, 18) + .addComponent(MaleD)) + .addGroup(jPanel6Layout.createSequentialGroup() + .addGap(26, 26, 26) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel39, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel46) + .addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(40, 40, 40) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel40, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel47) + .addComponent(BldGrp1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(12, 12, 12) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel41) + .addComponent(txtFname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel6Layout.createSequentialGroup() + .addGap(40, 40, 40) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel42, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(txtE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(40, 40, 40) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel43, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(txtC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(jPanel6Layout.createSequentialGroup() + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel44, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) + .addGap(36, 36, 36) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txtQ, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel45) + .addComponent(jLabel51, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(jDateChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(ErrLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(35, 35, 35) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(Add_Doc) + .addComponent(jButton1) + .addComponent(ResetBtnD)) + .addGap(65, 65, 65)) + ); + + jTabbedPane4.addTab("DOCTOR", jPanel6); + + jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Treatments", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("TlwgTypewriter", 1, 18))); // NOI18N + + jLabel5.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel5.setText("Panchakarma"); + + jLabel6.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel6.setText("Special"); + + jComboBox1.setMaximumRowCount(4); + jComboBox1.setSelectedItem("None"); + + jComboBox2.setMaximumRowCount(4); + jComboBox2.setToolTipText(""); + jComboBox2.setSelectedItem("None"); + + jLabel7.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel7.setText("Panchakarma Therapies"); + + jComboBox3.setMaximumRowCount(4); + jComboBox3.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + jComboBox3.setSelectedItem("None"); + + jLabel8.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel8.setText("Kerela Treatments"); + + jComboBox4.setMaximumRowCount(4); + jComboBox4.setSelectedItem("None"); + + javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel7) + .addComponent(jLabel8)) + .addGap(53, 53, 53) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jComboBox3, 0, 147, Short.MAX_VALUE) + .addComponent(jComboBox4, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel6) + .addComponent(jLabel5)) + .addGap(56, 56, 56) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 224, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 341, javax.swing.GroupLayout.PREFERRED_SIZE)))) + .addContainerGap(111, Short.MAX_VALUE)) + ); + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGap(22, 22, 22) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel5) + .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(68, 68, 68) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel6) + .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(68, 68, 68) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel7) + .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 68, Short.MAX_VALUE) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel8) + .addComponent(jComboBox4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(68, 68, 68)) + ); + + jLabel1.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel1.setText("Selected Treatments"); + + jTextArea1.setColumns(20); + jTextArea1.setRows(5); + jTextArea1.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTextArea1FocusGained(evt); + } + }); + jScrollPane1.setViewportView(jTextArea1); + + jButton2.setFont(new java.awt.Font("Chilanka", 1, 18)); // NOI18N + jButton2.setText("Confirm"); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(108, 108, 108) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(jPanel1Layout.createSequentialGroup() + .addComponent(jLabel1) + .addGap(36, 36, 36) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 289, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jButton2)) + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(114, Short.MAX_VALUE)) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(52, 52, 52) + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(36, 36, 36) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel1) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(21, Short.MAX_VALUE)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jButton2) + .addGap(89, 89, 89)))) + ); + + jTabbedPane4.addTab("PANCHAKARMA", jPanel1); + + jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Medicines", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("TlwgTypewriter", 1, 18))); // NOI18N + + jLabel2.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel2.setText("Prepared Meds"); + + jComboBox5.setMaximumRowCount(4); + jComboBox5.setSelectedItem("None"); + + jLabel3.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel3.setText("Imported"); + + jComboBox6.setMaximumRowCount(4); + jComboBox6.setSelectedItem("None"); + + javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5); + jPanel5.setLayout(jPanel5Layout); + jPanel5Layout.setHorizontalGroup( + jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel5Layout.createSequentialGroup() + .addGap(15, 15, 15) + .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel3) + .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 84, Short.MAX_VALUE) + .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jComboBox5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jComboBox6, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(40, 40, 40)) + ); + jPanel5Layout.setVerticalGroup( + jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel5Layout.createSequentialGroup() + .addGap(41, 41, 41) + .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel2) + .addComponent(jComboBox5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(72, 72, 72) + .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jComboBox6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel3)) + .addContainerGap(262, Short.MAX_VALUE)) + ); + + GenBillBtn.setFont(new java.awt.Font("Chilanka", 1, 18)); // NOI18N + GenBillBtn.setText("Generate Bill"); + GenBillBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + GenBillBtnActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); + jPanel4.setLayout(jPanel4Layout); + jPanel4Layout.setHorizontalGroup( + jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel4Layout.createSequentialGroup() + .addGap(73, 73, 73) + .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(283, Short.MAX_VALUE)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(GenBillBtn) + .addGap(57, 57, 57)) + ); + jPanel4Layout.setVerticalGroup( + jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel4Layout.createSequentialGroup() + .addGap(10, 10, 10) + .addComponent(GenBillBtn) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(178, Short.MAX_VALUE)) + ); + + jPanel5.getAccessibleContext().setAccessibleName(""); + + jTabbedPane4.addTab("MEDICINES", jPanel4); + jTabbedPane4.setEnabledAt(3, false); + + LogoutBtn.setFont(new java.awt.Font("Chilanka", 1, 18)); // NOI18N + LogoutBtn.setText("Logout"); + LogoutBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + LogoutBtnActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jTabbedPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 853, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(LogoutBtn) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(LogoutBtn) + .addGap(0, 0, Short.MAX_VALUE)) + .addComponent(jTabbedPane4)) + .addContainerGap()) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void ViewBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ViewBtnActionPerformed + // TODO add your handling code here: + new View("Patient").setVisible(true); + }//GEN-LAST:event_ViewBtnActionPerformed + + private void AddBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_AddBtnActionPerformed + // TODO add your handling code here: + ImageIcon icon = new ImageIcon("src/images/icons8-task-completed-48.png"); + String gender; + if(!manFields("Patient")) + return; + if(Male.isSelected()) + gender = "M"; + else + gender = "F"; + try { + stmt = con.createStatement(); + String sql = "insert into patientreg values("+P_id.getText()+",'"+Name.getText()+"','"+F_Name.getText()+"','"+Email.getText()+"','"+Contact.getText()+"',"+Age.getText()+",'"+Remarks.getText()+"','"+gender+"','"+BldGrp.getSelectedItem()+"','"+AlttDoc.getSelectedItem()+"','"+Add2.getText()+"','"+State2.getSelectedItem()+"','"+City2.getSelectedItem()+"');"; + System.out.println(sql); + if(stmt.executeUpdate(sql)==1) + { + JOptionPane.showMessageDialog(rootPane, "User added Successfully!", "User",JOptionPane.INFORMATION_MESSAGE, icon); + resetF(); + } + } catch (Exception e) { + System.err.println(e); + } + }//GEN-LAST:event_AddBtnActionPerformed + + private void FemaleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_FemaleActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_FemaleActionPerformed + + private void ContactFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_ContactFocusLost + // TODO add your handling code here: + if (!v.valPhn(Contact.getText())) { + ErrLabel.setText(v.contactErr); + return; + } + else + ErrLabel.setText(""); + }//GEN-LAST:event_ContactFocusLost + + private void EmailFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_EmailFocusLost + // TODO add your handling code here: + if (!v.valEmail(Email.getText())) { + ErrLabel.setText(v.emailErr); + return; + } + else + ErrLabel.setText(""); + }//GEN-LAST:event_EmailFocusLost + + private void Add_DocActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Add_DocActionPerformed + // TODO add your handling code here: + ImageIcon icon = new ImageIcon("src/images/icons8-task-completed-48.png"); + if(!manFields("Doc")) + return; + Date d = jDateChooser1.getDate(); + String strDate = new SimpleDateFormat("yyyy-MM-dd").format(d); + System.out.println(strDate); + String gender; + if(MaleD.isSelected()) + gender = "M"; + else + gender = "F"; + + try { + //con = DBConnect.Connect(); + stmt = con.createStatement(); + String sql = "insert into doctor values("+txtId.getText()+",'"+txtName.getText()+"','"+txtFname.getText()+"','"+txtE.getText()+"',"+txtC.getText()+",'"+txtQ.getText()+"','"+gender+"','"+BldGrp1.getSelectedItem()+"','"+strDate+"','"+AddArea.getText()+"');"; + System.out.println(sql); + if(stmt.executeUpdate(sql)==1) + { + JOptionPane.showMessageDialog(rootPane, "User added Successfully!", "User",JOptionPane.INFORMATION_MESSAGE, icon); + resetF(); + } + } catch (Exception e) { + System.err.println(e); + } + + }//GEN-LAST:event_Add_DocActionPerformed + + private void txtCActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtCActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txtCActionPerformed + + private void txtEFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtEFocusLost + // TODO add your handling code here: + if (!v.valEmail(txtE.getText())) { + ErrLabel1.setText(v.emailErr); + return; + } + else + ErrLabel1.setText(""); + }//GEN-LAST:event_txtEFocusLost + + private void txtCFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtCFocusLost + // TODO add your handling code here: + if(!v.valPhn(txtC.getText())){ + ErrLabel1.setText(v.contactErr); + return; + } + else + ErrLabel1.setText(""); + }//GEN-LAST:event_txtCFocusLost + + private void ResetBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ResetBtnActionPerformed +// try { +// // TODO add your handling code here: +// if(Name.getText().equals("") || Contact.getText().equals("")){ +// JOptionPane.showMessageDialog(rootPane,"Enter Name and Contact to get Info", "Err", 1); +// return; +// } +// con = DBConnect.Connect(); +// stmt = con.createStatement(); +// String sql = "select * from patientreg where PatientName = '"+Name.getText()+"' and ContactNo = "+Contact.getText()+""; +// System.out.println(sql); +// rs = stmt.executeQuery(sql); +// rs.next(); +// P_id.setText(Integer.toString(rs.getInt("PatientID"))); +// F_Name.setText(rs.getString("FathersName")); +// Email.setText(rs.getString("Email")); +// Age.setText(Integer.toString(rs.getInt("Age"))); +// Remarks.setText(rs.getString("Remarks")); +// Add2.setText(rs.getString("Address")); +// ButtonModel m; +// if(rs.getString("Gender").equals("M")) +// m = Male.getModel(); +// else +// m = Female.getModel(); +// buttonGroup1.setSelected(m, true); +// BldGrp.setSelectedItem(rs.getString("BG")); +// AlttDoc.setSelectedItem(rs.getString("Doctor")); +// State2.setSelectedItem(rs.getString("State")); +// City2.setSelectedItem(rs.getString("City")); +// +// } catch (SQLException ex) { +// Logger.getLogger(Menu.class.getName()).log(Level.SEVERE, null, ex); +// } +// +// + resetF(); + }//GEN-LAST:event_ResetBtnActionPerformed + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + // TODO add your handling code here: + new View("Doc").setVisible(true); + }//GEN-LAST:event_jButton1ActionPerformed + + private void ResetBtnDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ResetBtnDActionPerformed + // TODO add your handling code here: + resetF(); + }//GEN-LAST:event_ResetBtnDActionPerformed + + private void LogoutBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_LogoutBtnActionPerformed + // TODO add your handling code here: + this.setVisible(false); + new LoginPharmcy().setVisible(true); + }//GEN-LAST:event_LogoutBtnActionPerformed + + private void Add2KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_Add2KeyPressed + // TODO add your handling code here: + }//GEN-LAST:event_Add2KeyPressed + + private void State2FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_State2FocusGained + // TODO add your handling code here: + }//GEN-LAST:event_State2FocusGained + + private void GenBillBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_GenBillBtnActionPerformed + // TODO add your handling code here: + new Billing().setVisible(true); + }//GEN-LAST:event_GenBillBtnActionPerformed + + private void jTextArea1FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextArea1FocusGained + // TODO add your handling code here: + jTextArea1.setText(jComboBox1.getSelectedItem().toString()+"\n"+jComboBox2.getSelectedItem().toString()+"\n"+jComboBox3.getSelectedItem().toString()+"\n"+jComboBox4.getSelectedItem().toString()); + }//GEN-LAST:event_jTextArea1FocusGained + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + // TODO add your handling code here: + if(JOptionPane.showConfirmDialog(rootPane, "Are you sure???") == 0) + { + jTabbedPane4.setEnabledAt(3,true); + jTabbedPane4.setSelectedIndex(3); + + } + }//GEN-LAST:event_jButton2ActionPerformed + + private void RemarksFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_RemarksFocusGained + // TODO add your handling code here: + Remarks.setText(""); + }//GEN-LAST:event_RemarksFocusGained + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new Menu().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JTextArea Add2; + private javax.swing.JTextArea AddArea; + private javax.swing.JButton AddBtn; + private javax.swing.JButton Add_Doc; + private javax.swing.JTextField Age; + private javax.swing.JComboBox<String> AlttDoc; + private javax.swing.JComboBox<String> BldGrp; + private javax.swing.JComboBox<String> BldGrp1; + private javax.swing.JComboBox<String> City2; + private javax.swing.JTextField Contact; + private javax.swing.JTextField Email; + private javax.swing.JLabel ErrLabel; + private javax.swing.JLabel ErrLabel1; + private javax.swing.JTextField F_Name; + private javax.swing.JRadioButton Female; + private javax.swing.JRadioButton FemaleD; + private javax.swing.JButton GenBillBtn; + private javax.swing.JButton LogoutBtn; + private javax.swing.JRadioButton Male; + private javax.swing.JRadioButton MaleD; + private javax.swing.JTextField Name; + private javax.swing.JLabel P_id; + private javax.swing.JTextArea Remarks; + private javax.swing.JButton ResetBtn; + private javax.swing.JButton ResetBtnD; + private javax.swing.JComboBox<String> State2; + private javax.swing.JButton ViewBtn; + private javax.swing.ButtonGroup buttonGroup1; + private javax.swing.ButtonGroup buttonGroup2; + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JComboBox<String> jComboBox1; + private javax.swing.JComboBox<String> jComboBox2; + private javax.swing.JComboBox<String> jComboBox3; + private javax.swing.JComboBox<String> jComboBox4; + private javax.swing.JComboBox<String> jComboBox5; + private javax.swing.JComboBox<String> jComboBox6; + private com.toedter.calendar.JDateChooser jDateChooser1; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel13; + private javax.swing.JLabel jLabel14; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel27; + private javax.swing.JLabel jLabel28; + private javax.swing.JLabel jLabel29; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel30; + private javax.swing.JLabel jLabel31; + private javax.swing.JLabel jLabel32; + private javax.swing.JLabel jLabel33; + private javax.swing.JLabel jLabel34; + private javax.swing.JLabel jLabel35; + private javax.swing.JLabel jLabel36; + private javax.swing.JLabel jLabel37; + private javax.swing.JLabel jLabel38; + private javax.swing.JLabel jLabel39; + private javax.swing.JLabel jLabel40; + private javax.swing.JLabel jLabel41; + private javax.swing.JLabel jLabel42; + private javax.swing.JLabel jLabel43; + private javax.swing.JLabel jLabel44; + private javax.swing.JLabel jLabel45; + private javax.swing.JLabel jLabel46; + private javax.swing.JLabel jLabel47; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel51; + private javax.swing.JLabel jLabel52; + private javax.swing.JLabel jLabel6; + private javax.swing.JLabel jLabel7; + private javax.swing.JLabel jLabel8; + private javax.swing.JPanel jPanel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JPanel jPanel3; + private javax.swing.JPanel jPanel4; + private javax.swing.JPanel jPanel5; + private javax.swing.JPanel jPanel6; + private javax.swing.JPanel jPanel8; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JScrollPane jScrollPane2; + private javax.swing.JScrollPane jScrollPane4; + private javax.swing.JScrollPane jScrollPane5; + private javax.swing.JSeparator jSeparator3; + private javax.swing.JSeparator jSeparator4; + private javax.swing.JTabbedPane jTabbedPane4; + private javax.swing.JTextArea jTextArea1; + public javax.swing.JTextField txtC; + public javax.swing.JTextField txtE; + public javax.swing.JTextField txtFname; + private javax.swing.JLabel txtId; + public javax.swing.JTextField txtName; + public javax.swing.JTextField txtQ; + // End of variables declaration//GEN-END:variables +} diff --git a/src/com/sdtssp/hospitalUI/NewUser.form b/src/com/sdtssp/hospitalUI/NewUser.form new file mode 100644 index 0000000..96b89bf --- /dev/null +++ b/src/com/sdtssp/hospitalUI/NewUser.form @@ -0,0 +1,352 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.9" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="New User"/> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="33" green="ff" red="99" type="rgb"/> + </Property> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace pref="29" max="32767" attributes="0"/> + <Component id="jPanel1" min="-2" pref="1002" max="-2" attributes="0"/> + <EmptySpace pref="36" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace pref="32" max="32767" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="35" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jSeparator2" min="-2" pref="1096" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="447" max="-2" attributes="0"/> + <Component id="jLabel18" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel12" min="-2" max="-2" attributes="0"/> + <Component id="jLabel14" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel16" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="146" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="Pwd1" min="-2" pref="162" max="-2" attributes="0"/> + <Component id="UName1" alignment="1" min="-2" pref="162" max="-2" attributes="0"/> + <Component id="Name1" min="-2" pref="162" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="103" alignment="1" groupAlignment="0" attributes="0"> + <Component id="RegBtn1" min="-2" max="-2" attributes="0"/> + <Component id="SecQ1" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="-2" pref="44" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel17" min="-2" max="-2" attributes="0"/> + <Component id="jLabel11" min="-2" max="-2" attributes="0"/> + <Component id="jLabel15" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel13" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="Contact1" alignment="1" min="-2" pref="162" max="-2" attributes="0"/> + <Component id="SecA1" alignment="1" min="-2" pref="162" max="-2" attributes="0"/> + <Component id="Email1" alignment="1" min="-2" pref="162" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jLabel10" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="LoginBtn1" min="-2" pref="73" max="-2" attributes="0"/> + <Group type="102" alignment="1" attributes="0"> + <Component id="ErrLabel1" min="-2" pref="294" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="110" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="CPwd1" min="-2" pref="162" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="-2" pref="198" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="450" max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="20" max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="32" max="-2" attributes="0"/> + <Component id="jSeparator2" min="-2" pref="21" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="jLabel18" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="16" max="32767" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="Name1" alignment="3" min="-2" pref="35" max="-2" attributes="0"/> + <Component id="jLabel16" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel17" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="Email1" alignment="3" min="-2" pref="35" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="39" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="jLabel10" min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="UName1" alignment="3" min="-2" pref="35" max="-2" attributes="0"/> + <Component id="jLabel11" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="SecA1" alignment="3" min="-2" pref="35" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="-2" pref="59" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel14" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel15" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="Contact1" alignment="3" min="-2" pref="35" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="53" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="Pwd1" alignment="3" min="-2" pref="35" max="-2" attributes="0"/> + <Component id="jLabel12" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel13" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="103" alignment="1" groupAlignment="0" attributes="0"> + <Component id="SecQ1" min="-2" max="-2" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="86" max="-2" attributes="0"/> + <Component id="CPwd1" min="-2" pref="35" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace pref="23" max="32767" attributes="0"/> + <Component id="ErrLabel1" min="-2" pref="35" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="LoginBtn1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="RegBtn1" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="41" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel10"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Username"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel11"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Contact Number"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel12"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Password"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel13"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Confirm Password"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel14"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Security Question"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel15"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Security Answer"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="UName1"> + </Component> + <Component class="javax.swing.JTextField" name="Contact1"> + <Events> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="Contact1FocusLost"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="Contact1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JPasswordField" name="Pwd1"> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="Pwd1FocusGained"/> + </Events> + </Component> + <Component class="javax.swing.JPasswordField" name="CPwd1"> + </Component> + <Component class="javax.swing.JTextField" name="SecA1"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="SecA1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JSeparator" name="jSeparator2"> + </Component> + <Component class="javax.swing.JComboBox" name="SecQ1"> + <Properties> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="3"> + <StringItem index="0" value="Hospital''s foundation year?"/> + <StringItem index="1" value="Hospital''s name?"/> + <StringItem index="2" value="Medical''s store name?"/> + </StringArray> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="jLabel16"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Name"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="Name1"> + </Component> + <Component class="javax.swing.JTextField" name="Email1"> + <Events> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="Email1FocusLost"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="Email1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel17"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Email"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel18"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Ubuntu" size="18" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="<html><font color=red>All Fields are Mandatory</font></html>"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="ErrLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="16" style="1"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JButton" name="RegBtn1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Register"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="RegBtn1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="LoginBtn1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Back"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="LoginBtn1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/images/panchaved.gif"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/src/com/sdtssp/hospitalUI/NewUser.java b/src/com/sdtssp/hospitalUI/NewUser.java new file mode 100644 index 0000000..05cc355 --- /dev/null +++ b/src/com/sdtssp/hospitalUI/NewUser.java @@ -0,0 +1,425 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.sdtssp.hospitalUI; + +import com.sdtssp.DBConnect; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import com.sdtssp.Validators; +import java.awt.Color; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.ImageIcon; +import javax.swing.JFrame; +import javax.swing.JOptionPane; + +/** + * + * @author nilesh + */ +public class NewUser extends javax.swing.JFrame { + Statement stmt = null; + Connection con = null; + ResultSet rs = null; + Validators v; + /** + * Creates new form NewUser + */ + public NewUser() { + v = new Validators(); + con = DBConnect.Connect(); + setExtendedState(getExtendedState() | JFrame.MAXIMIZED_BOTH); + initComponents(); + getContentPane().setBackground(Color.getHSBColor(1, 1, 0.38f)); + CPwd1.setEnabled(false); + } + public void reset() + { + Name1.setText(""); + UName1.setText(""); + Pwd1.setText(""); + CPwd1.setText(""); + Contact1.setText(""); + SecA1.setText(""); + Email1.setText(""); + } + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jPanel1 = new javax.swing.JPanel(); + jLabel10 = new javax.swing.JLabel(); + jLabel11 = new javax.swing.JLabel(); + jLabel12 = new javax.swing.JLabel(); + jLabel13 = new javax.swing.JLabel(); + jLabel14 = new javax.swing.JLabel(); + jLabel15 = new javax.swing.JLabel(); + UName1 = new javax.swing.JTextField(); + Contact1 = new javax.swing.JTextField(); + Pwd1 = new javax.swing.JPasswordField(); + CPwd1 = new javax.swing.JPasswordField(); + SecA1 = new javax.swing.JTextField(); + jSeparator2 = new javax.swing.JSeparator(); + SecQ1 = new javax.swing.JComboBox<>(); + jLabel16 = new javax.swing.JLabel(); + Name1 = new javax.swing.JTextField(); + Email1 = new javax.swing.JTextField(); + jLabel17 = new javax.swing.JLabel(); + jLabel18 = new javax.swing.JLabel(); + ErrLabel1 = new javax.swing.JLabel(); + RegBtn1 = new javax.swing.JButton(); + LoginBtn1 = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("New User"); + setForeground(new java.awt.Color(153, 255, 51)); + + jLabel10.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel10.setText("Username"); + + jLabel11.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel11.setText("Contact Number"); + + jLabel12.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel12.setText("Password"); + + jLabel13.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel13.setText("Confirm Password"); + + jLabel14.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel14.setText("Security Question"); + + jLabel15.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel15.setText("Security Answer"); + + Contact1.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusLost(java.awt.event.FocusEvent evt) { + Contact1FocusLost(evt); + } + }); + Contact1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + Contact1ActionPerformed(evt); + } + }); + + Pwd1.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + Pwd1FocusGained(evt); + } + }); + + SecA1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + SecA1ActionPerformed(evt); + } + }); + + SecQ1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Hospital''s foundation year?", "Hospital''s name?", "Medical''s store name?" })); + + jLabel16.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel16.setText("Name"); + + Email1.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusLost(java.awt.event.FocusEvent evt) { + Email1FocusLost(evt); + } + }); + Email1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + Email1ActionPerformed(evt); + } + }); + + jLabel17.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N + jLabel17.setText("Email"); + + jLabel18.setFont(new java.awt.Font("Ubuntu", 0, 18)); // NOI18N + jLabel18.setText("<html><font color=red>All Fields are Mandatory</font></html>"); + + ErrLabel1.setFont(new java.awt.Font("Dialog", 1, 16)); // NOI18N + + RegBtn1.setFont(new java.awt.Font("Chilanka", 1, 18)); // NOI18N + RegBtn1.setText("Register"); + RegBtn1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + RegBtn1ActionPerformed(evt); + } + }); + + LoginBtn1.setFont(new java.awt.Font("Chilanka", 1, 18)); // NOI18N + LoginBtn1.setText("Back"); + LoginBtn1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + LoginBtn1ActionPerformed(evt); + } + }); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/panchaved.gif"))); // NOI18N + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 1096, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(447, 447, 447) + .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel12) + .addComponent(jLabel14) + .addComponent(jLabel16)) + .addGap(146, 146, 146) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(Pwd1, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(UName1, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(Name1, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(RegBtn1) + .addComponent(SecQ1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGap(44, 44, 44) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel17) + .addComponent(jLabel11) + .addComponent(jLabel15) + .addComponent(jLabel13)))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(Contact1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(SecA1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(Email1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addComponent(jLabel10) + .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(LoginBtn1, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel1Layout.createSequentialGroup() + .addComponent(ErrLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 294, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(110, 110, 110))))) + .addGap(18, 18, 18) + .addComponent(CPwd1, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGap(198, 198, 198)))) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(450, 450, 450) + .addComponent(jLabel1) + .addGap(0, 0, Short.MAX_VALUE)) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(20, 20, 20) + .addComponent(jLabel1) + .addGap(32, 32, 32) + .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(Name1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel16) + .addComponent(jLabel17) + .addComponent(Email1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(39, 39, 39) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jLabel10) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(UName1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel11) + .addComponent(SecA1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGap(59, 59, 59) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel14) + .addComponent(jLabel15) + .addComponent(Contact1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(53, 53, 53) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(Pwd1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel12) + .addComponent(jLabel13))) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(SecQ1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(86, 86, 86) + .addComponent(CPwd1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE) + .addComponent(ErrLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(LoginBtn1) + .addComponent(RegBtn1)) + .addGap(41, 41, 41)) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap(29, Short.MAX_VALUE) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 1002, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(36, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addContainerGap(32, Short.MAX_VALUE) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(35, Short.MAX_VALUE)) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void RegBtn1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RegBtn1ActionPerformed + try { + ImageIcon icon = new ImageIcon("src/images/icons8-task-completed-48.png"); + // TODO add your handling code here: + + stmt = con.createStatement(); + if(Pwd1.getText().equals(CPwd1.getText())) + { + stmt.executeUpdate("insert into registrations values('"+Name1.getText()+"','"+UName1.getText()+"','"+Pwd1.getText()+"','"+Email1.getText()+"',"+Contact1.getText()+",'"+SecQ1.getSelectedItem()+"','"+SecA1.getText()+"')"); + JOptionPane.showMessageDialog(rootPane,"User Successfully Added!!","Success",1, icon); + reset(); + new LoginPharmcy().setVisible(true); + this.setVisible(false); + } + // + } catch (SQLException ex) { + Logger.getLogger(NewUser.class.getName()).log(Level.SEVERE, null, ex); + } + }//GEN-LAST:event_RegBtn1ActionPerformed + + private void Contact1FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_Contact1FocusLost + // TODO add your handling code here: + if (!v.valPhn(Contact1.getText())) { + ErrLabel1.setText(v.contactErr); + return; + } + else + ErrLabel1.setText(""); + }//GEN-LAST:event_Contact1FocusLost + + private void Contact1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Contact1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_Contact1ActionPerformed + + private void SecA1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SecA1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_SecA1ActionPerformed + + private void Email1FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_Email1FocusLost + // TODO add your handling code here: + if (!v.valEmail(Email1.getText())) { + ErrLabel1.setText(v.emailErr); + return; + } + else + ErrLabel1.setText(""); + }//GEN-LAST:event_Email1FocusLost + + private void Email1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Email1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_Email1ActionPerformed + + private void LoginBtn1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_LoginBtn1ActionPerformed + // TODO add your handling code here: + this.setVisible(false); + new LoginPharmcy().setVisible(true); + }//GEN-LAST:event_LoginBtn1ActionPerformed + + private void Pwd1FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_Pwd1FocusGained + // TODO add your handling code here: + CPwd1.setEnabled(true); + }//GEN-LAST:event_Pwd1FocusGained + + /** + * @param args the command line arguments + */ +// public static void main(String args[]) { +// /* Set the Nimbus look and feel */ +// //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> +// /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. +// * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html +// */ +// try { +// for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { +// if ("Nimbus".equals(info.getName())) { +// javax.swing.UIManager.setLookAndFeel(info.getClassName()); +// break; +// } +// } +// } catch (ClassNotFoundException ex) { +// java.util.logging.Logger.getLogger(NewUser.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); +// } catch (InstantiationException ex) { +// java.util.logging.Logger.getLogger(NewUser.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); +// } catch (IllegalAccessException ex) { +// java.util.logging.Logger.getLogger(NewUser.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); +// } catch (javax.swing.UnsupportedLookAndFeelException ex) { +// java.util.logging.Logger.getLogger(NewUser.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); +// } +// //</editor-fold> +// +// /* Create and display the form */ +// java.awt.EventQueue.invokeLater(new Runnable() { +// public void run() { +// new NewUser().setVisible(true); +// } +// }); +// } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JPasswordField CPwd1; + private javax.swing.JTextField Contact1; + private javax.swing.JTextField Email1; + private javax.swing.JLabel ErrLabel1; + private javax.swing.JButton LoginBtn1; + private javax.swing.JTextField Name1; + private javax.swing.JPasswordField Pwd1; + private javax.swing.JButton RegBtn1; + private javax.swing.JTextField SecA1; + private javax.swing.JComboBox<String> SecQ1; + private javax.swing.JTextField UName1; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel10; + private javax.swing.JLabel jLabel11; + private javax.swing.JLabel jLabel12; + private javax.swing.JLabel jLabel13; + private javax.swing.JLabel jLabel14; + private javax.swing.JLabel jLabel15; + private javax.swing.JLabel jLabel16; + private javax.swing.JLabel jLabel17; + private javax.swing.JLabel jLabel18; + private javax.swing.JPanel jPanel1; + private javax.swing.JSeparator jSeparator2; + // End of variables declaration//GEN-END:variables +} diff --git a/src/com/sdtssp/hospitalUI/Retail.form b/src/com/sdtssp/hospitalUI/Retail.form index 08e4bf5..b6b7f94 100644 --- a/src/com/sdtssp/hospitalUI/Retail.form +++ b/src/com/sdtssp/hospitalUI/Retail.form @@ -66,6 +66,7 @@ </NonVisualComponents> <Properties> <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="Retail"/> </Properties> <SyntheticProperties> <SyntheticProperty name="menuBar" type="java.lang.String" value="jMenuBar1"/> @@ -87,161 +88,131 @@ <Layout> <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton3" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jScrollPane6" min="-2" pref="1014" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + <Component id="jSeparator1" alignment="1" max="32767" attributes="0"/> <Group type="102" alignment="1" attributes="0"> <Group type="103" groupAlignment="1" attributes="0"> <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jComboBox1" min="-2" pref="488" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="38" max="-2" attributes="0"/> + <Component id="jButton4" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="jLabel8" min="-2" pref="59" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> <EmptySpace min="-2" pref="20" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="jComboBox1" alignment="0" min="-2" pref="232" max="-2" attributes="0"/> + <Component id="jLabel5" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="jLabel7" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Component id="jLabel1" min="-2" pref="80" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="36" max="-2" attributes="0"/> + <Component id="jLabel2" min="-2" pref="95" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="42" max="-2" attributes="0"/> + <Component id="jLabel3" min="-2" pref="44" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jLabel4" min="-2" pref="151" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="46" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="-2" pref="39" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="jLabel11" alignment="1" min="-2" pref="77" max="-2" attributes="0"/> + <Component id="jLabel9" min="-2" max="-2" attributes="0"/> </Group> - <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="36" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" attributes="0"> - <Component id="jTextField1" min="-2" pref="36" max="-2" attributes="0"/> + <Component id="jLabel13" min="-2" pref="47" max="-2" attributes="0"/> <EmptySpace type="separate" max="-2" attributes="0"/> - <Component id="jLabel8" min="-2" pref="27" max="-2" attributes="0"/> + <Component id="jTextField1" min="-2" pref="46" max="-2" attributes="0"/> </Group> <Group type="102" attributes="0"> - <EmptySpace min="-2" pref="8" max="-2" attributes="0"/> - <Component id="jLabel6" min="-2" max="-2" attributes="0"/> - <EmptySpace type="separate" max="-2" attributes="0"/> - <Component id="jLabel7" min="-2" max="-2" attributes="0"/> - </Group> - </Group> - <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <Component id="jScrollPane2" min="-2" pref="60" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="jScrollPane1" min="-2" pref="50" max="-2" attributes="0"/> - </Group> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="12" max="-2" attributes="0"/> - <Component id="jLabel9" min="-2" max="-2" attributes="0"/> - <EmptySpace type="separate" max="-2" attributes="0"/> <Component id="jLabel10" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="40" max="-2" attributes="0"/> + <Component id="jLabel6" min="-2" max="-2" attributes="0"/> </Group> </Group> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <Component id="jLabel11" min="-2" max="-2" attributes="0"/> - <EmptySpace min="0" pref="0" max="32767" attributes="0"/> - </Group> - <Component id="jScrollPane3" max="32767" attributes="0"/> - </Group> - </Group> - <Group type="102" attributes="0"> - <EmptySpace max="32767" attributes="0"/> - <Component id="jLabel1" min="-2" pref="42" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="jLabel2" min="-2" pref="48" max="-2" attributes="0"/> - </Group> - </Group> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <EmptySpace min="-2" pref="35" max="-2" attributes="0"/> - <Component id="jLabel3" min="-2" pref="38" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="jLabel4" min="-2" pref="48" max="-2" attributes="0"/> - </Group> - <Group type="102" attributes="0"> - <EmptySpace max="-2" attributes="0"/> + <EmptySpace min="43" max="32767" attributes="0"/> <Component id="jButton1" min="-2" pref="80" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="236" max="-2" attributes="0"/> </Group> </Group> </Group> - <Component id="jSeparator1" alignment="0" max="32767" attributes="0"/> - <Group type="102" alignment="1" attributes="0"> - <EmptySpace max="32767" attributes="0"/> - <Component id="jButton3" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="jScrollPane6" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="jButton2" min="-2" max="-2" attributes="0"/> - <Component id="jScrollPane4" min="-2" pref="77" max="-2" attributes="0"/> - <Component id="jLabel12" min="-2" pref="48" max="-2" attributes="0"/> - </Group> - <EmptySpace min="-2" pref="62" max="-2" attributes="0"/> - </Group> </Group> </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="jLabel1" alignment="3" min="-2" pref="23" max="-2" attributes="0"/> - <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="jLabel3" alignment="3" min="-2" pref="23" max="-2" attributes="0"/> - <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> + <Group type="102" alignment="1" attributes="0"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" attributes="0"> - <EmptySpace min="-2" pref="8" max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="jLabel9" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="jLabel10" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="jLabel11" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> + <EmptySpace pref="203" max="32767" attributes="0"/> + <Component id="jScrollPane6" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="jLabel8" alignment="1" max="32767" attributes="0"/> - <Group type="102" attributes="0"> - <Component id="jComboBox1" min="-2" max="-2" attributes="0"/> - <EmptySpace min="0" pref="0" max="32767" attributes="0"/> - </Group> - </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Component id="jLabel5" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="jComboBox1" min="-2" max="-2" attributes="0"/> </Group> <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="9" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="23" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel1" alignment="3" min="-2" pref="23" max="-2" attributes="0"/> + <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel3" alignment="3" min="-2" pref="23" max="-2" attributes="0"/> + <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> - <Component id="jScrollPane3" min="-2" max="-2" attributes="0"/> - <Component id="jScrollPane1" min="-2" max="-2" attributes="0"/> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel9" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel10" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton4" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel11" alignment="3" min="-2" pref="20" max="-2" attributes="0"/> + <Component id="jLabel13" alignment="3" min="-2" pref="20" max="-2" attributes="0"/> + <Component id="jTextField1" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Component id="jButton1" alignment="1" min="-2" pref="56" max="-2" attributes="0"/> </Group> - <EmptySpace min="0" pref="0" max="32767" attributes="0"/> - </Group> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Component id="jTextField1" max="32767" attributes="0"/> </Group> </Group> - </Group> - <Group type="102" alignment="1" attributes="0"> - <EmptySpace max="32767" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="jScrollPane2" alignment="1" min="-2" pref="24" max="-2" attributes="0"/> - <Component id="jButton1" alignment="1" min="-2" pref="42" max="-2" attributes="0"/> - </Group> - </Group> - </Group> - <EmptySpace type="separate" max="-2" attributes="0"/> - <Component id="jSeparator1" min="-2" pref="13" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <EmptySpace max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="jSeparator1" min="-2" pref="13" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="85" max="-2" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + </Group> <Component id="jButton3" min="-2" max="-2" attributes="0"/> - <Component id="jScrollPane6" min="-2" pref="135" max="-2" attributes="0"/> </Group> </Group> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="134" max="-2" attributes="0"/> - <Component id="jLabel12" min="-2" pref="29" max="-2" attributes="0"/> - </Group> </Group> - <EmptySpace max="-2" attributes="0"/> - <Component id="jScrollPane4" min="-2" max="-2" attributes="0"/> - <EmptySpace type="separate" max="-2" attributes="0"/> - <Component id="jButton2" min="-2" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="731" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="13" max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -249,11 +220,17 @@ <SubComponents> <Component class="javax.swing.JLabel" name="jLabel1"> <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> <Property name="text" type="java.lang.String" value="Bill no"/> </Properties> </Component> <Component class="javax.swing.JLabel" name="jLabel2"> <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> <Property name="text" type="java.lang.String" value="jLabel2"/> <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> @@ -266,36 +243,41 @@ </Component> <Component class="javax.swing.JLabel" name="jLabel3"> <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> <Property name="text" type="java.lang.String" value="Date"/> </Properties> </Component> <Component class="javax.swing.JLabel" name="jLabel4"> <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> <Property name="text" type="java.lang.String" value="jLabel2"/> <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> - <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> - <BevelBorder> - <Color PropertyName="highlightInner" blue="80" green="80" id="gray" palette="1" red="80" type="palette"/> - </BevelBorder> + <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> + <EmptyBorder/> </Border> </Property> </Properties> </Component> <Component class="javax.swing.JSeparator" name="jSeparator1"> + <Properties> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[0, 5]"/> + </Property> + </Properties> </Component> <Component class="javax.swing.JComboBox" name="jComboBox1"> <Properties> <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> - <StringArray count="4"> - <StringItem index="0" value="Item 1"/> - <StringItem index="1" value="Item 2"/> - <StringItem index="2" value="Item 3"/> - <StringItem index="3" value="Item 4"/> - </StringArray> + <StringArray count="0"/> </Property> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jComboBox1ActionPerformed"/> + <EventHandler event="keyPressed" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="jComboBox1KeyPressed"/> </Events> <AuxValues> <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> @@ -303,103 +285,70 @@ </Component> <Component class="javax.swing.JLabel" name="jLabel5"> <Properties> - <Property name="text" type="java.lang.String" value="Drug Name :"/> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Medicine Name :"/> </Properties> </Component> <Component class="javax.swing.JTextField" name="jTextField1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + </Properties> </Component> <Component class="javax.swing.JLabel" name="jLabel6"> <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> <Property name="text" type="java.lang.String" value="Qty"/> </Properties> </Component> <Component class="javax.swing.JLabel" name="jLabel7"> <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> <Property name="text" type="java.lang.String" value="Available"/> </Properties> </Component> <Component class="javax.swing.JLabel" name="jLabel8"> <Properties> - <Property name="text" type="java.lang.String" value="144"/> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="N A"/> </Properties> </Component> <Component class="javax.swing.JLabel" name="jLabel9"> <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> <Property name="text" type="java.lang.String" value="Batch No."/> </Properties> </Component> <Component class="javax.swing.JLabel" name="jLabel10"> <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> <Property name="text" type="java.lang.String" value="MRP"/> </Properties> </Component> - <Container class="javax.swing.JScrollPane" name="jScrollPane1"> - <AuxValues> - <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> - </AuxValues> - - <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> - <SubComponents> - <Component class="javax.swing.JTextPane" name="jTextPane1"> - </Component> - </SubComponents> - </Container> - <Container class="javax.swing.JScrollPane" name="jScrollPane2"> - <AuxValues> - <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> - </AuxValues> - - <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> - <SubComponents> - <Component class="javax.swing.JTextPane" name="jTextPane2"> - </Component> - </SubComponents> - </Container> - <Container class="javax.swing.JScrollPane" name="jScrollPane3"> - <AuxValues> - <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> - </AuxValues> - - <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> - <SubComponents> - <Component class="javax.swing.JTextPane" name="jTextPane3"> - </Component> - </SubComponents> - </Container> - <Component class="javax.swing.JLabel" name="jLabel11"> - <Properties> - <Property name="text" type="java.lang.String" value=" Amount"/> - </Properties> - </Component> <Component class="javax.swing.JButton" name="jButton1"> <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> <Property name="text" type="java.lang.String" value="Add"/> </Properties> - </Component> - <Component class="javax.swing.JButton" name="jButton2"> - <Properties> - <Property name="text" type="java.lang.String" value="Checkout"/> - </Properties> <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> </Events> </Component> - <Container class="javax.swing.JScrollPane" name="jScrollPane4"> - <AuxValues> - <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> - </AuxValues> - - <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> - <SubComponents> - <Component class="javax.swing.JTextPane" name="jTextPane4"> - </Component> - </SubComponents> - </Container> - <Component class="javax.swing.JLabel" name="jLabel12"> - <Properties> - <Property name="text" type="java.lang.String" value="Total : "/> - </Properties> - </Component> <Container class="javax.swing.JScrollPane" name="jScrollPane6"> <AuxValues> <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> @@ -409,9 +358,12 @@ <SubComponents> <Component class="javax.swing.JTable" name="jTable1"> <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> - <Table columnCount="6" rowCount="4"> - <Column editable="false" title="Select" type="java.lang.Boolean"/> + <Table columnCount="6" rowCount="0"> + <Column editable="true" title="Select" type="java.lang.Boolean"/> <Column editable="false" title="Name" type="java.lang.String"/> <Column editable="false" title="Batch" type="java.lang.Object"/> <Column editable="false" title="QTY" type="java.lang.Object"/> @@ -453,6 +405,7 @@ </Column> </TableColumnModel> </Property> + <Property name="rowHeight" type="int" value="40"/> <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> <TableHeader reorderingAllowed="true" resizingAllowed="true"/> </Property> @@ -462,11 +415,142 @@ </Container> <Component class="javax.swing.JButton" name="jButton3"> <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> <Property name="text" type="java.lang.String" value="Remove"/> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> </Events> </Component> + <Component class="javax.swing.JButton" name="jButton4"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Go"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton4ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel11"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value=" N A"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel13"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value=" N A"/> + </Properties> + </Component> + <Container class="javax.swing.JPanel" name="jPanel1"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel16" alignment="0" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel15" min="-2" max="-2" attributes="0"/> + <Component id="jLabel12" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel14" alignment="0" min="-2" pref="83" max="-2" attributes="0"/> + </Group> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton2" min="-2" pref="139" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="36" max="-2" attributes="0"/> + <Component id="jLabel15" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="jLabel16" min="-2" pref="36" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> + <Component id="jLabel12" min="-2" pref="29" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="jLabel14" min="-2" pref="37" max="-2" attributes="0"/> + <EmptySpace pref="48" max="32767" attributes="0"/> + <Component id="jButton2" min="-2" pref="55" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel16"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="0" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="0"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel12"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="24" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Total : "/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel14"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="24" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="33" green="33" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="0"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel15"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value=" Total items"/> + </Properties> + </Component> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Arial" size="21" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="ff" red="66" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Checkout"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> </SubComponents> </Form> diff --git a/src/com/sdtssp/hospitalUI/Retail.java b/src/com/sdtssp/hospitalUI/Retail.java index 78322da..9827ea9 100644 --- a/src/com/sdtssp/hospitalUI/Retail.java +++ b/src/com/sdtssp/hospitalUI/Retail.java @@ -3,39 +3,155 @@ * To change this template file, choose Tools | Templates * and open the template in the editor. */ + package com.sdtssp.hospitalUI; -import javax.swing.JComboBox; + +import com.sdtssp.*; import org.jdesktop.swingx.autocomplete.*; + import java.awt.Toolkit; +import java.awt.event.KeyEvent; import java.awt.print.*; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; import java.text.MessageFormat; -import javax.swing.JTable; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.JFrame; +import javax.swing.JOptionPane; +import javax.swing.table.DefaultTableModel; + +//import sun.applet.Main; + /** * * @author shreeram */ public class Retail extends javax.swing.JFrame { - + Statement stmt = null; + Connection con = null; + ResultSet rs ; + int totalAmount = 0; + Medicine row; + List medicineList; + MedicineTableModel model; + DefaultTableModel dtm; /** * Creates new form Retail */ public Retail() { initComponents(); + + dtm = (DefaultTableModel) jTable1.getModel(); + jComboBox1.setEditable(true); - AutoCompleteDecorator .decorate(jComboBox1); - addItem(jComboBox1); + + AutoCompleteDecorator.decorate(jComboBox1); + jTable1.setShowGrid(true); + setExtendedState(getExtendedState() | JFrame.MAXIMIZED_BOTH); + DateTimeFormatter dtf = DateTimeFormatter.ofPattern("dd/MM/yyyy"); + LocalDate localDate = LocalDate.now(); + loadMedicines(); + jLabel4.setText(dtf.format(localDate)); + } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ + void loadMedicines(){ + try { + rs = Pharmacy.selectMedItems("is not null"); + while (rs.next()) { + String medItem = rs.getString("Name"); + jComboBox1.addItem(medItem); + } + } catch (SQLException ex) { + Logger.getLogger(Retail.class.getName()).log(Level.SEVERE, null, ex); + } + } - void addItem(JComboBox jComboBox){ - - } + int calculateTotal(String cmd, int amt){ + if(cmd.equals("add")){ + totalAmount += amt; + }else{ + totalAmount -= amt; + } + + return totalAmount; + } + + void updateQty(int qty, String item,String command){ + int available = 0; + int newQty = 0; + try { + rs = Pharmacy.selectMedItems("='"+item+"'"); + while(rs.next()){ + available = rs.getInt("Qty"); + } + if(command.equals("sub")){ + newQty = (available - qty); + }else{ + newQty = (available + qty); + } + if(Pharmacy.updateMedQty(newQty, item) != 0){ + jLabel8.setText(Integer.toString( newQty )); + } + } catch (SQLException ex) { + Logger.getLogger(Retail.class.getName()).log(Level.SEVERE, null, ex); + } + } + void removeItem() { + for (int i = 0;i<dtm.getRowCount();i++ ) { + if((Boolean)dtm.getValueAt(i,0)==true){ + + int total = calculateTotal("remove", Integer.parseInt(dtm.getValueAt(i,5).toString())); + jLabel14.setText(Integer.toString(total)); + System.out.println("val :"+ Integer.parseInt(dtm.getValueAt(i,5).toString())); + System.out.println("totalAmount :"+totalAmount+" total:"+total); + int modelQty = (int)dtm.getValueAt(i,3); + updateQty(modelQty, (String)dtm.getValueAt(i,1), "add"); + dtm.removeRow(i); + jLabel16.setText(Integer.toString(jTable1.getRowCount())); + } + } + } + void addItem() { + java.awt.event.ActionEvent evt =null; + jButton4ActionPerformed(evt); + if(Integer.parseInt(jLabel8.getText()) == 0){ + JOptionPane.showMessageDialog(rootPane,"0 "+jComboBox1.getSelectedItem().toString()+" left !!!"); + return ; + } + String item = jComboBox1.getSelectedItem().toString(); + + int batch = Integer.parseInt(jLabel11.getText()); + int qty = Integer.parseInt(jTextField1.getText()); + if(qty<=0){ + JOptionPane.showMessageDialog(rootPane,"Qauntity cannot be "+qty+"!!!"); + return; + } + int mrp = Integer.parseInt(jLabel13.getText()); + int amt = qty*mrp; + int currQty=Integer.parseInt(jTextField1.getText()); + + updateQty(currQty,item,"sub"); + for(int i=0;i<dtm.getRowCount();i++){ //makes changes for qty and amount in UI table + + if(dtm.getValueAt(i,1).toString().equals(item)){ + qty = (int)dtm.getValueAt(i,3)+qty; + dtm.removeRow(i); + amt = qty*mrp; + System.out.println("qty : "+qty); + } + } + dtm.addRow(new Object[]{false, item, batch, qty, mrp, amt}); + jLabel16.setText(Integer.toString(jTable1.getRowCount())); + int total = calculateTotal("add", currQty*mrp); + jLabel14.setText(Integer.toString(total)); + } @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { @@ -55,21 +171,19 @@ private void initComponents() { jLabel8 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); - jScrollPane1 = new javax.swing.JScrollPane(); - jTextPane1 = new javax.swing.JTextPane(); - jScrollPane2 = new javax.swing.JScrollPane(); - jTextPane2 = new javax.swing.JTextPane(); - jScrollPane3 = new javax.swing.JScrollPane(); - jTextPane3 = new javax.swing.JTextPane(); - jLabel11 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); - jButton2 = new javax.swing.JButton(); - jScrollPane4 = new javax.swing.JScrollPane(); - jTextPane4 = new javax.swing.JTextPane(); - jLabel12 = new javax.swing.JLabel(); jScrollPane6 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); jButton3 = new javax.swing.JButton(); + jButton4 = new javax.swing.JButton(); + jLabel11 = new javax.swing.JLabel(); + jLabel13 = new javax.swing.JLabel(); + jPanel1 = new javax.swing.JPanel(); + jLabel16 = new javax.swing.JLabel(); + jLabel12 = new javax.swing.JLabel(); + jLabel14 = new javax.swing.JLabel(); + jLabel15 = new javax.swing.JLabel(); + jButton2 = new javax.swing.JButton(); jMenuBar1 = new javax.swing.JMenuBar(); jMenu1 = new javax.swing.JMenu(); jMenu2 = new javax.swing.JMenu(); @@ -84,63 +198,68 @@ private void initComponents() { jMenuItem1.setText("jMenuItem1"); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("Retail"); + setPreferredSize(new java.awt.Dimension(972, 745)); + jLabel1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel1.setText("Bill no"); + jLabel2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel2.setText("jLabel2"); jLabel2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, null, java.awt.Color.gray, null, null)); + jLabel3.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel3.setText("Date"); + jLabel4.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel4.setText("jLabel2"); - jLabel4.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, null, java.awt.Color.gray, null, null)); + jLabel4.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + + jSeparator1.setPreferredSize(new java.awt.Dimension(0, 5)); - jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); jComboBox1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jComboBox1ActionPerformed(evt); } }); + jComboBox1.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyPressed(java.awt.event.KeyEvent evt) { + jComboBox1KeyPressed(evt); + } + }); + + jLabel5.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jLabel5.setText("Medicine Name :"); - jLabel5.setText("Drug Name :"); + jTextField1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jLabel6.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel6.setText("Qty"); + jLabel7.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel7.setText("Available"); - jLabel8.setText("144"); + jLabel8.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jLabel8.setText("N A"); + jLabel9.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel9.setText("Batch No."); + jLabel10.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel10.setText("MRP"); - jScrollPane1.setViewportView(jTextPane1); - - jScrollPane2.setViewportView(jTextPane2); - - jScrollPane3.setViewportView(jTextPane3); - - jLabel11.setText(" Amount"); - + jButton1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jButton1.setText("Add"); - - jButton2.setText("Checkout"); - jButton2.addActionListener(new java.awt.event.ActionListener() { + jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton2ActionPerformed(evt); + jButton1ActionPerformed(evt); } }); - jScrollPane4.setViewportView(jTextPane4); - - jLabel12.setText("Total : "); - + jTable1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTable1.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { - {null, null, null, null, null, null}, - {null, null, null, null, null, null}, - {null, null, null, null, null, null}, - {null, null, null, null, null, null} + }, new String [] { "Select", "Name", "Batch", "QTY", "MRP", "AMT" @@ -150,7 +269,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { java.lang.Boolean.class, java.lang.String.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class }; boolean[] canEdit = new boolean [] { - false, false, false, false, false, false + true, false, false, false, false, false }; public Class getColumnClass(int columnIndex) { @@ -161,12 +280,14 @@ public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); + jTable1.setRowHeight(40); jScrollPane6.setViewportView(jTable1); if (jTable1.getColumnModel().getColumnCount() > 0) { jTable1.getColumnModel().getColumn(0).setResizable(false); jTable1.getColumnModel().getColumn(0).setPreferredWidth(20); } + jButton3.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jButton3.setText("Remove"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -174,6 +295,77 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); + jButton4.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jButton4.setText("Go"); + jButton4.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton4ActionPerformed(evt); + } + }); + + jLabel11.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jLabel11.setText(" N A"); + + jLabel13.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jLabel13.setText(" N A"); + + jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + + jLabel16.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jLabel16.setForeground(new java.awt.Color(255, 0, 0)); + jLabel16.setText("0"); + + jLabel12.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N + jLabel12.setText("Total : "); + + jLabel14.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N + jLabel14.setForeground(new java.awt.Color(255, 51, 51)); + jLabel14.setText("0"); + + jLabel15.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jLabel15.setText(" Total items"); + + jButton2.setFont(new java.awt.Font("Arial", 1, 21)); // NOI18N + jButton2.setForeground(new java.awt.Color(102, 255, 0)); + jButton2.setText("Checkout"); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel15) + .addComponent(jLabel12) + .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(36, 36, 36) + .addComponent(jLabel15) + .addGap(18, 18, 18) + .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(28, 28, 28) + .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE) + .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + jMenu1.setText("File"); jMenuBar1.add(jMenu1); @@ -215,125 +407,105 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jButton3) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 1014, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE)) + .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 488, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(38, 38, 38) + .addComponent(jButton4) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(20, 20, 20) + .addComponent(jLabel5) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel7))) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(layout.createSequentialGroup() + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(36, 36, 36) + .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(42, 42, 42) + .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(46, 46, 46)) + .addGroup(layout.createSequentialGroup() + .addGap(39, 39, 39) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel9)) + .addGap(36, 36, 36) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jLabel5) - .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(28, 28, 28) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(layout.createSequentialGroup() - .addGap(8, 8, 8) - .addComponent(jLabel6) - .addGap(18, 18, 18) - .addComponent(jLabel7))) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() - .addGap(12, 12, 12) - .addComponent(jLabel9) + .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) - .addComponent(jLabel10))) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() - .addComponent(jLabel11) - .addGap(0, 0, Short.MAX_VALUE)) - .addComponent(jScrollPane3))) - .addGroup(layout.createSequentialGroup() - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(35, 35, 35) - .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(layout.createSequentialGroup() - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)))) - .addComponent(jSeparator1) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(jButton3) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jButton2) - .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(62, 62, 62)) + .addComponent(jLabel10) + .addGap(40, 40, 40) + .addComponent(jLabel6))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(236, 236, 236)))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jLabel2) - .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jLabel4)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addGap(8, 8, 8) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jLabel5) - .addComponent(jLabel6) - .addComponent(jLabel7) - .addComponent(jLabel9) - .addComponent(jLabel10) - .addComponent(jLabel11)) + .addContainerGap(203, Short.MAX_VALUE) + .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(layout.createSequentialGroup() - .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, Short.MAX_VALUE)))) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel5) + .addGap(18, 18, 18) + .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() - .addGap(9, 9, 9) + .addGap(23, 23, 23) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel2) + .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel4)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(0, 0, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jTextField1)))) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel7) + .addComponent(jLabel9) + .addComponent(jLabel10) + .addComponent(jLabel6)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton4) + .addComponent(jLabel8) + .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)))) + .addGap(18, 18, 18) + .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(37, 37, 37) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)))) - .addGap(18, 18, 18) - .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jButton3) - .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGroup(layout.createSequentialGroup() - .addGap(134, 134, 134) - .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addComponent(jButton2) - .addGap(731, 731, 731)) + .addGroup(layout.createSequentialGroup() + .addGap(85, 85, 85) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(jButton3)))) + .addGap(13, 13, 13)) ); pack(); @@ -349,12 +521,17 @@ private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox1ActionPerformed // TODO add your handling code here: - + + System.out.println("tem :" +jComboBox1.getSelectedItem().toString()); }//GEN-LAST:event_jComboBox1ActionPerformed private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed // TODO add your handling code here: - + try{ + removeItem(); + }catch(NullPointerException n){ + JOptionPane.showMessageDialog(rootPane,"0 Checkbox selected !!!"); + } }//GEN-LAST:event_jButton3ActionPerformed private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed @@ -363,7 +540,7 @@ private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS MessageFormat footer = new MessageFormat("Page{0,number,integer}"); try{ - jTable1.print(JTable.PrintMode.NORMAL, header, footer); + jTable1.print(); }catch(java.awt.print.PrinterException e){ System.err.format("Cannot print the table", e.getMessage()); @@ -371,6 +548,55 @@ private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS }//GEN-LAST:event_jButton2ActionPerformed + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + try{ + addItem(); + }catch(NumberFormatException n){ + JOptionPane.showMessageDialog(rootPane,"incorrect Qty \n check again!!!"); + } +// TODO add your handling code here: + }//GEN-LAST:event_jButton1ActionPerformed + + private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed + String medItem = jComboBox1.getSelectedItem().toString(); + try { + System.out.println("HELLOO"); + rs = Pharmacy.selectMedItems("='"+medItem+"'"); + while (rs.next()) { + jLabel8.setText(Integer.toString(rs.getInt("Qty"))); + jLabel11.setText(Integer.toString(rs.getInt("BatchNo"))); + jLabel13.setText(Integer.toString(rs.getInt("MRP"))); + } + } catch (SQLException ex) { + Logger.getLogger(Retail.class.getName()).log(Level.SEVERE, null, ex); + } + + }//GEN-LAST:event_jButton4ActionPerformed + + jComboBox1.addActionListener(new ActionListener() { + + private void jComboBox1KeyPressed(java.awt.event.KeyEvent evt) { + System.out.println("get key code :"+evt.getKeyCode()); + if(evt.getKeyCode() == KeyEvent.VK_ENTER) + jButton4.doClick(); + } +}); + + private void jComboBox1KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jComboBox1KeyPressed + System.out.println("get key code :"+evt.getKeyCode()); + if(evt.getKeyCode() == KeyEvent.VK_ENTER) + jButton4.doClick(); + }//GEN-LAST:event_jComboBox1KeyPressed + + + public static void main(String args[]) { + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new Retail().setVisible(true); + } + }); + } + /** * @param args the command line arguments */ @@ -380,11 +606,16 @@ private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JButton jButton3; + private javax.swing.JButton jButton4; private javax.swing.JComboBox<String> jComboBox1; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel10; private javax.swing.JLabel jLabel11; private javax.swing.JLabel jLabel12; + private javax.swing.JLabel jLabel13; + private javax.swing.JLabel jLabel14; + private javax.swing.JLabel jLabel15; + private javax.swing.JLabel jLabel16; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; @@ -403,18 +634,11 @@ private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS private javax.swing.JMenuItem jMenuItem3; private javax.swing.JMenuItem jMenuItem4; private javax.swing.JMenuItem jMenuItem5; - private javax.swing.JScrollPane jScrollPane1; - private javax.swing.JScrollPane jScrollPane2; - private javax.swing.JScrollPane jScrollPane3; - private javax.swing.JScrollPane jScrollPane4; + private javax.swing.JPanel jPanel1; private javax.swing.JScrollPane jScrollPane6; private javax.swing.JSeparator jSeparator1; private javax.swing.JTable jTable1; private javax.swing.JTextField jTextField1; - private javax.swing.JTextPane jTextPane1; - private javax.swing.JTextPane jTextPane2; - private javax.swing.JTextPane jTextPane3; - private javax.swing.JTextPane jTextPane4; // End of variables declaration//GEN-END:variables diff --git a/src/com/sdtssp/hospitalUI/View.form b/src/com/sdtssp/hospitalUI/View.form new file mode 100644 index 0000000..fa2e5a0 --- /dev/null +++ b/src/com/sdtssp/hospitalUI/View.form @@ -0,0 +1,124 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="2"/> + <Property name="title" type="java.lang.String" value="Data"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="true"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace pref="31" max="32767" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="29" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="-2" pref="13" max="-2" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="19" max="-2" attributes="0"/> + <Component id="jScrollPane1" pref="1310" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="301" max="-2" attributes="0"/> + <Component id="UpdBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="deleteRecBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="393" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> + <Component id="jScrollPane1" max="32767" attributes="0"/> + <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="UpdBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="deleteRecBtn" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="ViewTab"> + <Properties> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> + <Connection code="new javax.swing.table.DefaultTableModel( new Object [][] { }, str ) " type="code"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_CreateCodePost" type="java.lang.String" value="String [] str = new String [] {}; if(this.Caller.equals("Patient")) { str = this.pat; } else str = this.doc;"/> + </AuxValues> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="UpdBtn"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Update"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="UpdBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="deleteRecBtn"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Chilanka" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Delete"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="deleteRecBtnActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/src/com/sdtssp/hospitalUI/View.java b/src/com/sdtssp/hospitalUI/View.java new file mode 100644 index 0000000..6527238 --- /dev/null +++ b/src/com/sdtssp/hospitalUI/View.java @@ -0,0 +1,323 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.sdtssp.hospitalUI; + +import com.sdtssp.DBConnect; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.Dictionary; +import java.util.Hashtable; +import javax.swing.ImageIcon; +import javax.swing.JOptionPane; +import javax.swing.table.DefaultTableModel; + +/** + * + * @author nilesh + */ +public class View extends javax.swing.JFrame { + Statement stmt = null; + Connection con = null; + ResultSet rs = null; + String Caller ; + String [] pat ; + String [] doc ; + Dictionary patientdb = new Hashtable(); + Dictionary doctordb = new Hashtable(); + /** + * Creates new form View + */ + public View() { + setExtendedState(MAXIMIZED_BOTH | getExtendedState()); + } + + public View(String Caller){ + patientdb.put(0, "PatientID"); + patientdb.put(1, "PatientName"); + patientdb.put(2, "FathersName"); + patientdb.put(3, "Email"); + patientdb.put(4, "ContactNo"); + patientdb.put(5, "Age"); + patientdb.put(6, "Remarks"); + patientdb.put(7, "Gender"); + patientdb.put(8, "BG"); + patientdb.put(9, "Doctor"); + patientdb.put(10, "Address"); + patientdb.put(11, "State"); + patientdb.put(12, "City"); + + doctordb.put(0, "DoctorID"); + doctordb.put(1, "DoctorName"); + doctordb.put(2, "FatherName"); + doctordb.put(3, "Email"); + doctordb.put(4, "ContactNo"); + doctordb.put(5, "Qualifications"); + doctordb.put(6, "Gender"); + doctordb.put(7, "BloodGroup"); + doctordb.put(8, "DateOfJoining"); + doctordb.put(9, "Address"); + this.Caller = Caller; + this.pat = new String [] { + + "Patient Id", "Patient's Name", "Father's Name", "Email", "Contact", "Age", "Remarks", "Gender", "Bloshree od Group", "Doctor", "Address", "State", "City" + }; + + + this.doc = new String [] { + "Doctor ID", "Doctor's Name", "Father's Name", "Email", "Contact", "Qualification", "Gender", "Blood Group", "Date of Joining", "Address" + }; + + initComponents(); + try { + con = DBConnect.Connect(); + stmt = con.createStatement(); + if(Caller.equals("Patient")) + { + String sql = "select * from patientreg"; + rs = stmt.executeQuery(sql); + DefaultTableModel model = (DefaultTableModel) ViewTab.getModel(); + while (rs.next()) { + model.addRow(new Object[]{ + rs.getInt("PatientID"), + rs.getString("PatientName"), + rs.getString("FathersName"), + rs.getString("Email"), + rs.getLong("ContactNo"), + rs.getInt("Age"), + rs.getString("Remarks"), + rs.getString("Gender"), + rs.getString("BG"), + rs.getString("Doctor"), + rs.getString("Address"), + rs.getString("State"), + rs.getString("City") + }); + } + } + else{ + String sql = "select * from doctor"; + rs = stmt.executeQuery(sql); + DefaultTableModel model = (DefaultTableModel) ViewTab.getModel(); + while (rs.next()) { + model.addRow(new Object[]{ + rs.getInt("DoctorID"), + rs.getString("DoctorName"), + rs.getString("FatherName"), + rs.getString("Email"), + rs.getLong("ContactNo"), + rs.getString("Qualifications"), + rs.getString("Gender"), + rs.getString("BloodGroup"), + rs.getString("DateOfJoining"), + rs.getString("Address") + }); + } + } + } catch (SQLException ex) { + Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ex); + } + + + } + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jPanel1 = new javax.swing.JPanel(); + jScrollPane1 = new javax.swing.JScrollPane(); + ViewTab = new javax.swing.JTable(); + String [] str = new String [] {}; + if(this.Caller.equals("Patient")) + { + str = this.pat; + } + else + str = this.doc; + UpdBtn = new javax.swing.JButton(); + deleteRecBtn = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setTitle("Data"); + + ViewTab.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + }, + str + ) + ); + jScrollPane1.setViewportView(ViewTab); + + UpdBtn.setFont(new java.awt.Font("Chilanka", 1, 18)); // NOI18N + UpdBtn.setText("Update"); + UpdBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + UpdBtnActionPerformed(evt); + } + }); + + deleteRecBtn.setFont(new java.awt.Font("Chilanka", 1, 18)); // NOI18N + deleteRecBtn.setText("Delete"); + deleteRecBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + deleteRecBtnActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(19, 19, 19) + .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1310, Short.MAX_VALUE) + .addGap(21, 21, 21)) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(301, 301, 301) + .addComponent(UpdBtn) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(deleteRecBtn) + .addGap(393, 393, 393)) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(30, 30, 30) + .addComponent(jScrollPane1) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(UpdBtn) + .addComponent(deleteRecBtn)) + .addContainerGap()) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addContainerGap(31, Short.MAX_VALUE) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(29, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGap(13, 13, 13) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + + pack(); + setLocationRelativeTo(null); + }// </editor-fold>//GEN-END:initComponents + + private void UpdBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_UpdBtnActionPerformed + try { + // TODO add your handling code here: + String sql=""; + con = DBConnect.Connect(); + stmt = con.createStatement(); + + int i = ViewTab.getEditingRow(); + int j = ViewTab.getEditingColumn(); + if(ViewTab.getColumnName(0).equals("Patient Id")) + { + int row = ViewTab.getSelectedRow(); + sql = "update table patientreg set "+patientdb.get(j)+" = '"+ViewTab.getValueAt(row,j)+"' where PatientID = "+ViewTab.getValueAt(i,0)+""; + } + System.out.println(sql); + } catch (SQLException ex) { + Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ex); + } + }//GEN-LAST:event_UpdBtnActionPerformed + + private void deleteRecBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteRecBtnActionPerformed + try { + // TODO add your handling code here: + ImageIcon icon = new ImageIcon("src/images/icons8-task-completed-48.png"); + int row = ViewTab.getSelectedRow(); + stmt = con.createStatement(); + + String sql; + if(ViewTab.getColumnName(0).equals("Patient Id")) + { + sql = "delete from patientreg where PatientID="+ViewTab.getValueAt(row,0)+"; "; + int success = stmt.executeUpdate(sql); + if(success!=0) + { + JOptionPane.showMessageDialog(rootPane,"Patient Deleted Successfully", "Success",1,icon); + ((DefaultTableModel)ViewTab.getModel()).removeRow(row); + } + } + + if(ViewTab.getColumnName(0).equals("Doctor ID")) + { + System.out.println("In doc"); + sql = "delete from doctor where DoctorID="+ViewTab.getValueAt(row,0)+"; "; + int success = stmt.executeUpdate(sql); + if(success!=0) + { + JOptionPane.showMessageDialog(rootPane,"Doctor Deleted Successfully", "Success",1,icon); + ((DefaultTableModel)ViewTab.getModel()).removeRow(row); + } + } + } catch (SQLException ex) { + Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ex); + } + }//GEN-LAST:event_deleteRecBtnActionPerformed + + /** + * @param args the command line arguments + */ +// public static void main(String args[]) { +// /* Set the Nimbus look and feel */ +// //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> +// /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. +// * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html +// */ +// try { +// for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { +// if ("Nimbus".equals(info.getName())) { +// javax.swing.UIManager.setLookAndFeel(info.getClassName()); +// break; +// } +// } +// } catch (ClassNotFoundException ex) { +// java.util.logging.Logger.getLogger(View.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); +// } catch (InstantiationException ex) { +// java.util.logging.Logger.getLogger(View.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); +// } catch (IllegalAccessException ex) { +// java.util.logging.Logger.getLogger(View.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); +// } catch (javax.swing.UnsupportedLookAndFeelException ex) { +// java.util.logging.Logger.getLogger(View.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); +// } +// //</editor-fold> +// +// /* Create and display the form */ +// java.awt.EventQueue.invokeLater(new Runnable() { +// public void run() { +// new View().setVisible(true); +// } +// }); +// } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton UpdBtn; + private javax.swing.JTable ViewTab; + private javax.swing.JButton deleteRecBtn; + private javax.swing.JPanel jPanel1; + private javax.swing.JScrollPane jScrollPane1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/images/icons8-task-completed-48.png b/src/images/icons8-task-completed-48.png new file mode 100644 index 0000000..770d110 Binary files /dev/null and b/src/images/icons8-task-completed-48.png differ diff --git a/src/images/panchaved-logo.png b/src/images/panchaved-logo.png new file mode 100644 index 0000000..d152f73 Binary files /dev/null and b/src/images/panchaved-logo.png differ diff --git a/src/images/panchaved.gif b/src/images/panchaved.gif new file mode 100644 index 0000000..19f500b Binary files /dev/null and b/src/images/panchaved.gif differ diff --git a/src/images/success.png b/src/images/success.png new file mode 100644 index 0000000..d0d34b1 Binary files /dev/null and b/src/images/success.png differ diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..636b7b7 --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +Mala nahi mahiti mi kay kartoy te diff --git a/update_log.txt b/update_log.txt index ea911ea..a7bd379 100644 --- a/update_log.txt +++ b/update_log.txt @@ -1,2 +1,3 @@ 1. Updated screeenshots -2. included DBMS packages.docx file \ No newline at end of file +2. included DBMS packages.docx file +3. Login System added. Check HospitalDB.sql file. Also initialise environment variables before running program.