(...)
new JFrame("tela1").setVisible(true);
new JFrame("tela2").setVisible(true);
new JFrame("tela3").setVisible(true);
new JFrame("tela4").setVisible(true);
new JFrame("tela5").setVisible(true);
(...)
todas as 5 telas irão surgir. Todavia se eu tentar o mesmo em SWT (usando o seguinte velho feijão-com-arroz: )
(...)
Display display = new Display();
Shell shell = new Shell(display);
shell.open();
while(!shell.isDisposed()){
if(!display.readAndDispatch())display.sleep();
}display.dispose();
(...)
por causa deste bendito laço não podemos mostrar a tela2, nem a 3 e assim por diante.
se algum cristão já tiver superado esse tipo de coisa, por favor, poste aqui,
ps: estou aceitando qualquer sugestão salvo usar Swing, visto que o negócio vai ter que rodar em qualquer JVM.
(...)
Display display = new Display();
Shell[] shells = new Shell[5];
for (int i = 0; i < shells.length; i++) {
shells[i] = new Shell(display);
shells[i].open();
}
while(!allShellsDisposed(shells)){
if(!display.readAndDispatch())display.sleep();
}display.dispose();
(...)
onde allShellsDisposed(Shell) deve verificar se todos os Shells foram fechados.
PS: não testei
PS2: geralmente uso as classes de alto nível da JFace, que seriam mais ou menos equivalentes às classes da Swing, e encapsulam boa parte do "código sujo" que vc geralmente usa quando programa em SWT direto.