How can I force a frame repaint()immediately after maximizing or changing it?
repaint()
I cannot find which method is called when this particular operation occurs. I have a bunch of graphics that are written by graphic objects in paint, and their orientation depends on real-time feedback from getWidth()and getHeight(), but the paint is not called when I maximize, only when these pixels are unfortunately.
getWidth()
getHeight()
Register ComponentListener:
final Component myComponent = makeTheFrameOrWhatever(); myComponent.addComponentListener(new ComponentAdapter() { @Override public void componentResized(ComponentEvent e) { myComponent.repaint(); } });
, repize() paint(), , - , . , , repaint , , , , , , . , , , .
, , , .
Source: https://habr.com/ru/post/1720132/More articles:The first sentence of regular expressions is phpIncluding two related objects in SQLAlchemy - pythonHow to calculate width of list items - jqueryHow to avoid the "Element" x "in the namespace" x.xsd "has an invalid child element" Elements "in the namespace" x.xsd "? - xmlAs a developer, is it worth asking anonymous feedback from colleagues? - feedbackcalculate date add, but only on weekdays - dateKey-Based RSA Performance - performanceElegant algorithm for conversation line strings? - c #How to create a custom 404 page for my Django / Apache? - pythonWith semaphores and a βbarrierβ between threads - cAll Articles