Updating jframe online computer dating
Also, this is set up fairly poorly in two classes because I'll need a while loop running at one point (single LED blinking on/off until keypress), and I need to set up the Key Listener in another thread I think._____________ Some sample functions: Start: Ask for "Exposure Time" User will input 6, 7, 8, 9, or 10 "Exposure Time" divided by 4 = sequence time (in seconds) When user pushes the "p" key (power): turn on LED 1 Exposure: When the user push the "s" key (start): Delay .2 seconds Turn on LED 3 Wait "sequence time" Turn on LEDs 4 and 5 Wait "sequence time" Turn on LEDs 6 and 7 Wait "sequence time" Turn on LEDs 8 and 9 Wait "sequence time" Turn on LEDs A and B _____________ A few things I quickly saw: 1) You are updating the user interface from a thread that is not the Event Dispatcher Thread.There are comments spaced through the code showing how the JPanel was set up in this newer version.Any suggestions to get headed in the right direction?This last one is actually the main reason for your slowness. Would using Buffered Image solve this problem, and do you have any advice on its use here? And strange, but after removing any sort of super calls within paint Componet() the flickering has stopped.
Thanks in advance and sorry about the load of text in the question.Right now it seems to update far too slowly, for example everything turns on at the end of the "Exposure" loop.