Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class View extends ViewPart {
- public void createPartControl(Composite parent) {
- Display display = new Display();
- final Shell shell = new Shell(display);
- FileDialog dlg = new FileDialog(shell, SWT.OPEN);
- String fileName = dlg.open();
- if (fileName != null) {
- System.out.println(fileName);
- }
- ......
- }
- public void createPartControl(Composite parent) {
- FileDialog dlg = new FileDialog(parent.getShell(), SWT.OPEN);
- String fileName = dlg.open();
- if (fileName != null) {
- System.out.println(fileName);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement