I have a logging window in my application. The messages are written to the JTextArea inside this window.
JFrame -> JScrollPane -> JTextArea
Code that writes the messages:
LogTextArea.append(message + "\n");
If I have this log window open, whenever something writes a message to this window, the window automatically gets pushed to the top and focused.
For example, I have a form window open and Im filling out information. A message is written to the log window. When the message is written, the Log window gets focused and I can't type in the form I was filling out anymore.
How can I stop this from happening?