Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » org.eclipse.jface.util.Assert$AssertionFailedException Caused by Display == null
org.eclipse.jface.util.Assert$AssertionFailedException Caused by Display == null [message #445179] Wed, 27 October 2004 14:54 Go to next message
Eclipse UserFriend
Originally posted by: alfiewong.gmail.com

Hello,

I seem to have a problem creating a Display object where everytime I try
to create a display object I get this problem.

java.lang.ExceptionInInitializerError
Caused by: org.eclipse.jface.util.Assert$AssertionFailedException: null
argument;
at org.eclipse.jface.util.Assert.isNotNull(Assert.java:139)
at org.eclipse.jface.util.Assert.isNotNull(Assert.java:116)
at org.eclipse.jface.resource.ImageRegistry.<init>(ImageRegistry.java:77)
at org.eclipse.jface.resource.ImageRegistry.<init>(ImageRegistry.java:65)
at
org.eclipse.jface.resource.JFaceResources.getImageRegistry(J FaceResources.java:255)
at org.eclipse.jface.wizard.Wizard.<clinit>(Wizard.java:64)
Exception in thread "main"

and All I do is:

public static void main(String[] args)
{
Display display = new Display();
Shell shell = new Shell(display);
shell.setSize(300,300);
Label label1 = new Label(shell, SWT.WRAP);
label1.setText("Does this work?");
label1.setSize(100,20);
label1.setLocation(30,30);

shell.open();
while(!shell.isDisposed())
{
if(!display.readAndDispatch())
{
display.sleep();
}
}
display.dispose();
}

Am I missing something? I'm running Windows XP home on Acer Laptop.

Thanks
Re: org.eclipse.jface.util.Assert$AssertionFailedException Caused by Display == null [message #445274 is a reply to message #445179] Mon, 01 November 2004 14:30 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
Since your main does not use any JFace code, it is a mystery to me. Are you
sure the code below is exactly what you are running? The error comes when
instatntiating a JFace Wizard class. Where in your code are you doing this?

"Alfred Wong" <alfiewong@gmail.com> wrote in message
news:clocgc$dge$1@eclipse.org...
> Hello,
>
> I seem to have a problem creating a Display object where everytime I try
> to create a display object I get this problem.
>
> java.lang.ExceptionInInitializerError
> Caused by: org.eclipse.jface.util.Assert$AssertionFailedException: null
> argument;
> at org.eclipse.jface.util.Assert.isNotNull(Assert.java:139)
> at org.eclipse.jface.util.Assert.isNotNull(Assert.java:116)
> at org.eclipse.jface.resource.ImageRegistry.<init>(ImageRegistry.java:77)
> at org.eclipse.jface.resource.ImageRegistry.<init>(ImageRegistry.java:65)
> at
> org.eclipse.jface.resource.JFaceResources.getImageRegistry(J FaceResources.java:255)
> at org.eclipse.jface.wizard.Wizard.<clinit>(Wizard.java:64)
> Exception in thread "main"
>
> and All I do is:
>
> public static void main(String[] args)
> {
> Display display = new Display();
> Shell shell = new Shell(display);
> shell.setSize(300,300);
> Label label1 = new Label(shell, SWT.WRAP);
> label1.setText("Does this work?");
> label1.setSize(100,20);
> label1.setLocation(30,30);
>
> shell.open();
> while(!shell.isDisposed())
> {
> if(!display.readAndDispatch())
> {
> display.sleep();
> }
> }
> display.dispose();
> }
>
> Am I missing something? I'm running Windows XP home on Acer Laptop.
>
> Thanks
Previous Topic:how to enable keybord nav with celleditor
Next Topic:L & F
Goto Forum:
  


Current Time: Wed Oct 21 02:40:21 GMT 2020

Powered by FUDForum. Page generated in 0.07140 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top