|
|
open swt wizard from swing application
how do i to open an swt wizard or even a dialog from swing???
my whole app freezes up when i get to dialog.open()
public class myFram extends JFrame {
......
.....
public void someButton_actionPerformed() {
Shell shell = new Shell();
Wizard wizard = new MyWizard();
WizardDialog dialog = new WizardDialog(shell, wizard);
dialog.setBlockOnOpen(true);
int returnCode = dialog.open();
if (returnCode == Dialog.OK)
System.out.println("Finished!");
else
System.out.println("Cancelled");
shell.dispose();
}
......
}
if i try creating a new display it throws an exception...
now it just freezes on dialog.open(),
any ideas?
|
|
0
|
|
|
|
Reply
|
michalt76 (3)
|
11/15/2005 12:49:54 PM |
|
michalt76@hotmail.com wrote:
> how do i to open an swt wizard or even a dialog from swing???
> my whole app freezes ..
That might come in handy as a cooling unit.
...Or did you mean something else?
> if i try creating a new display it throws an exception...
> now it just freezes on dialog.open(),
> any ideas?
1) Name the 'exception' specifically, rather than
make your audience guess.
2) Search the forums where the SWT Experts post.
<http://www.eclipse.org/newsgroups/index.html>
|
|
0
|
|
|
|
Reply
|
Andrew
|
11/15/2005 1:09:16 PM
|
|
thanks for the tips andrew,
ok i took off -
// dialog.setBlockOnOpen(true);
so i can now see my wizard but the background doesn't refresh.
The exception i used to get was SWTException invalid thread access but
it doesn't matter cause i stopped trying to create a display.
i now simply create a new shell with (display)null.
the background swing app doesn't replaint when i move the swt wizard
around and it "plays dead" when i close the wizard until i minimize it
and restore it (from the taskbar) then it pops back up like nothing
happened.
|
|
0
|
|
|
|
Reply
|
michalt76
|
11/15/2005 1:33:10 PM
|
|
<michalt76@hotmail.com> wrote in message
news:1132058994.078460.285880@g43g2000cwa.googlegroups.com...
> how do i to open an swt wizard or even a dialog from swing???
I'm not sure about this, and maybe someone more knowlegeable can step in
here, but I think you're "not supposed to" mix Swing and SWT.
- Oliver
|
|
0
|
|
|
|
Reply
|
Oliver
|
11/15/2005 11:23:15 PM
|
|
|
3 Replies
109 Views
(page loaded in 0.039 seconds)
|
|
|
|
|
|
|
|
|