How to force repaint to Swing during debugging?

I use Swing and during debugging, I would like to redraw the whole frame to help me understand what is happening. I can look at my local variables perfectly with my debugger, but nothing like visual feedback. How can I get a panel / panel to repaint itself?

I don't care how dirty / inappropriate the solution is for real applications, I just want to accomplish this with my debugger expression evaluator while I am debugging. Since the method repaint()does not seem to do anything except add an event to the event queue, it does not work when my debugging pauses my application. I feel that I will need to do an update to the EventQueue stream or the user interface, but I do not know how to do this.

I would like to have a solution for redrawing while I am in the EventQueue thread, but also interested in knowing what is different if I am in another thread. I am debugging using IntelliJ Idea.

+4
source share

Source: https://habr.com/ru/post/1682541/


All Articles