|
|
|
Re: How to use a TitleAreaDialog as main Window [message #448962 is a reply to message #448960] |
Mon, 17 January 2005 04:03 |
Eclipse User |
|
|
|
Originally posted by: nickthat.yahoo.com
Thomas,
What you need to do is put a call like the following before you create
your TitleAreaDialog
new Display();
Nick
Thomas wrote:
> To clarify some things:
> It crashes with the following source code
>> import org.eclipse.jface.dialogs.TitleAreaDialog;
>> import org.eclipse.swt.widgets.*;
>>
>> public class Main
>> { public static void main(String[] args)
>> {
>> TitleAreaDialog dlg = new TitleAreaDialog(new Shell());
>> dlg.setTitle("Test");
>> dlg.open();
>> }
>> }
>>
> It doesn't crash when I call a message dialog.
>> import org.eclipse.jface.dialogs.TitleAreaDialog;
>> import org.eclipse.swt.widgets.*;
>>
>> public class Main
>> { public static void main(String[] args)
>> { MessageBox m = new MessageBox(new Shell());
>> m.setMessage("Hello, World");
>> m.open();
>> }
>> }
|
|
|
Powered by
FUDForum. Page generated in 1.07948 seconds