How to avoid flickering effect when switching from one jdialog to another jdialog

Hi, I created two jdialog box. from the first jdialog window, I call the second jdialog block. I placed my component in the center. But when I click on the next button, my program calls the second jdialog, but during this period (for a split second I found that some kind of flickering effect means that some kind of jdialog is displayed in the upper left of the screen, its share per second . may be a flickering effect, therefore, how to avoid this problem.

Thanks Sunil Kumar Sahoo

+3
source share
2 answers

, , . , :

dialog.setVisible(true);
dialog.setLocationRelativeTo(null);

:

dialog.setLocationRelativeTo(null);
dialog.setVisible(true);
+1

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


All Articles