Touch Screen Time and Attendance Project overview: ================================================== Operating System : Windows IDE : Netbeans Database : Postgres Project Name : Time and Attendance Webcamera : Creative Webcam
Coding Details ============== Main form = barcodeScanning_1.java Time class extended by Threads = myCurrentServerTime.java Webcam class extended by Threads = t1.java with t2.java other t2.java is used for webcam form and to set and get live picture from webcam.
When user start entering their token no then webcam starts processing. It take picture from a path and live picture from webcam and store into another path and at end report is generated with live picture.
Problem: ======== Wht problem i am facing is that i can not run both threads at one time. When i tries to run them using Thread.sleep(2000) method or boolean = true/false my CPU speed goes to 100% and webcam images doesnot appear on screen only black screen is coming and my form hangup due to continue processing.
So finally i stop one thread and run only webcam threads with the click of button. Means when user start touching token number my threads get start and when punch button is press then my threads stop and it get data from database and shown on form.
But problem is that when my thread runs CPU process goes to 100%. and delay of taking live pic from webcam comes out and employee starts getting late.
Here is my code for webcam threads, kindly suggest me where am i wrong and how can i reduce my CPU process and how can i get live picture without delaying.
Love is GOD and GOD is Love.
M/s. Anand Karia Concreting IT