I feel like a bit of a noob asking this; I’m trying to show a few quickly-changing values in a window (just a simple JFrame with a TextArea). Unfortunately, they change very quickly (i.e. 50 times a second), which cause the text to flicker to the point of being unreadable. It’s only for a bit of debugging, so I was trying to do this simply, but can’t seem to find an easy solution.
I’ve tried directly setting the text in the TextArea, and also using invokeLater(), but neither work well:-
SwingUtilities.invokeLater(new Runnable() {
public void run() {
textArea.setText(str);
}
});
Does anyone have a solution, or a simple way of just showing some quickly-changing debugging output in a window? Thanks!