Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Why do "PreferenceNode" trigger the exception ?
Why do "PreferenceNode" trigger the exception ? [message #453817] Mon, 11 April 2005 08:18
jp is currently offline jpFriend
Messages: 1
Registered: July 2009
Junior Member

With "JFace", the following source works well :

public class MainFrame {
public static void main(String[] args) {
Display display = new Display();
PreferenceManager mgr = new PreferenceManager();

// fragment #1
PreferenceNode one = new PreferenceNode("one", new PageOne());

PreferenceDialog dlg = new PreferenceDialog(null, mgr);;
class PageOne extends PreferencePage {
protected Control createContents(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
return composite;

But, the "NullPointerException" occurs if the fragment #1 above
is replaced with the following one :

PreferenceNode one = new PreferenceNode("one", "One",

What wrong ?
Previous Topic:How to get references to views from an editor
Next Topic:eclipse 3.1M6: unable to run a SWT app
Goto Forum:

Current Time: Mon Mar 08 13:40:06 GMT 2021

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

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

Back to the top