JTextArea and headless multithreaded application
I have an application trying to run in headless mode, then it starts multiple threads each thread try to use AWT to render an image
I do use JTextArea while rendering and i noticed that using JTextArea triggers KeyboardFocusManager.getCurrentKeyboardFocusManager which is a static synchronized method (meaning it will block other threads, trying to do the same thing at the same time), i also noticed that it install event listeners and Mouse/Keyboard listeners.
So, my question, Is using JTextArea in headless multithreaded app a good idea ? is there something else i can use that respect the headless state and not trigger keyboardFocuseHandler, should i expect my AWT based app to scale with more threads running in parallel or will thread blocking will become more of an issue ?
Sorry about the long question but i am new to AWT and the thread blocking starting to make me concerned about how my app will scale