Link to home
Start Free TrialLog in
Avatar of Tolgar
Tolgar

asked on

How to open a custom dialog box in SWT?

Hi,
I have a GUI in SWT and in this GUI when I click on a button in the toolbar, I would like to see the view that I show in the attachment.

How can I do it in SWT?
changelist-dialog.png
Avatar of gudii9
gudii9
Flag of United States of America image

ASKER CERTIFIED SOLUTION
Avatar of Valeri
Valeri
Flag of Bulgaria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tolgar
Tolgar

ASKER

Hi Valeri,
I added the following code to my ToolBarListener:

} else if (toolItem == Gui.item11) {
ChangeListDlg chngListDlg = new ChangeListDlg(shell);
chngListDlg.open();
}

Open in new window


Problem: It complains about "ChangeListDlg". It says "ChangeListDlg" cannot be resolved to a type. And the quick fix it recommends is to create a ChangeListDlg class. Do you think there is something wrong about the names of the classes?


I also added the following line to my Gui.java:

item11.addListener(SWT.Selection, toolBarListener);

Open in new window


and I created "CustomInputDialog.java" class.

Is there anything that I am missing in here?

Thanks,
ops, I'm really so sorry! :-( attached is the right file...
ChangeListDlg.java