The main problem is flickering when rendering.
I store all graphic objects in a table and try to redraw them after updating.
I read that there are other ways of drawing, but I couldn’t implement them. There were also difficulties with positioning the panels in the window. I managed to do the positioning, but maybe there is a more effective solution.
Please help.
Full example