Don't know if it's stupid or reasonable question.
I have methods which returns float/int data (x,y,z positions) of the P5 Glove (if you know it).
I also have update method which responds to the glove pulling.
All i'm having trouble with is creating UI and presenting the data in text area, means every update the text areas presenting the data refreshed and present the data.
Since code isn't that short here are links to the class: Details presentation methods and update
let's say for now I want to present showActiveLedPosX() method which returns the X position as String.
the other classes are glove (using glove methods and creating glove object and UI).
Should I use different class for UI? or should I do it all on ShowGloveValues class
I've never created UI and therefore I'm kinda clueless here, Tried to read about it on numerous resource sites and still couldn't achieve what's needed.
1. Keep the
UIthread apart from theNon-UIthread.2.
Event Dispatcher Threadis theUIthread, keep this thread to handle your UI only.3. You can also use
SwingWorkerfor this.4. Swing is based on
Mode View Controller. Moreover its better to divide your app packages also on the basis of MVC.eg: