Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Put ico in JFace WizardDialog
Put ico in JFace WizardDialog [message #447747] Thu, 16 December 2004 23:24 Go to next message
Marcos is currently offline MarcosFriend
Messages: 68
Registered: July 2009
Member
Hi:

When I put the ico in WizardDialog, I extends the createContents() method,
i.e.:

WizardDialog dialog = new WizardDialog(window.getShell(), wizard)
{
public Control createContents(Composite parent)
{

parent.getShell().setImage(SWTResourceManager.getImage("icons/myIco.ico "));
super.createContents(parent);
return parent;
}
};

this is fine, but I ask me if exist other way for this.
I tried to use setTitleImage() method before of use the open() method, but
eclipse say me:

java.lang.NullPointerException
at
org.eclipse.jface.dialogs.TitleAreaDialog.setTitleImage(Titl eAreaDialog.java:532)
at
com.intalgent.addressbook.menubar.NewContactAction.run(NewCo ntactAction.java:42)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:881 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:915)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:866)
at
org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContributionItem.java:785)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:668 )
at org.eclipse.jface.window.Window.open(Window.java:648)

I hope can you help me.

Marcos.
Re: Put ico in JFace WizardDialog [message #447756 is a reply to message #447747] Fri, 17 December 2004 15:36 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

You can't call setTitleImage until after the widgets have been created.
That is because there is underlying widget that is used in setTitleImage
that is not created until after all of the widgets have been created.
And that doesn't occur until after create() has been called on the dialog.


--
Thanks,
Rich Kulp
Previous Topic:GridLayout: can I have an empty cell in the grid?
Next Topic:SWT DoD Network Approval
Goto Forum:
  


Current Time: Fri Apr 19 18:15:54 GMT 2024

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

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

Back to the top