Код: Выделить всё
public JFrame waitDialog() {
JFrame wait = new JFrame();
wait.setTitle("My Dialog");
wait.setAlwaysOnTop(true);
wait.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
wait.setSize(300, 150);
wait.setLocationRelativeTo(null);
wait.setLayout(new BorderLayout());
String msg = "Plase Wait...";
wait.add(new JLabel(msg), BorderLayout.CENTER);
return wait;
}
Код: Выделить всё
...
JFrame wait = waitDialog();
wait.setVisisble(true);
for (int i=0;i
Подробнее здесь: [url]https://stackoverflow.com/questions/78648306/how-do-i-get-jframe-to-display-jpanel-text-content-even-when-called-by-action-ev[/url]
Мобильная версия