Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

cannot read SelectionListener

i'm trying on the tutorial at http://tools.osmosis.gr/blog/archives/2005/03/birt_rcp_viewer_1.html.

i have a openReportEditor method as shown below:
private void openReportEditor() {

serverUrlText.setText("http://127.0.0.1:8181/birt/");
String uri = serverUrlText.getText();

ReportEditorInput input = new ReportEditorInput();
input.setUri(uri);

OpenNewBrowserAction action = new OpenNewBrowserAction(input);
action.run();}

when i have created a button and i would like to call the openReportEditor. i did it in this way, button2.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
openReportEditor();
}

but the exception of ' java.lang.NullPointerException' is caught.
how to fix it?? thanks.
[879 byte] By [moonny] at [2007-11-11 8:44:50]