I have some problem with my code where I'm not able to discover where is the problem.
I have JLabel with an image and JTextField with background image, sometimes window is correctly drawn, sometimes it only draws Text Field.
Anybody can help me with finding problem?
Serhiy Boychenko wrote:I think I finally manged to solve problem...
The trick is adding
line of code in each function
That shouldn't be necessary. In fact, if you call super.repaint() from paintComponent, you will cause infinite repainting (or probably a StackOverFlowError). repaint(), through some steps, calls paintComponent, which again calls repaint(), etc.