Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. public class View extends ViewPart {
  2. public void createPartControl(Composite parent) {
  3.  
  4. Display display = new Display();
  5. final Shell shell = new Shell(display);
  6.  
  7. FileDialog dlg = new FileDialog(shell, SWT.OPEN);
  8. String fileName = dlg.open();
  9. if (fileName != null) {
  10. System.out.println(fileName);
  11. }
  12. ......
  13. }
  14.  
  15. public void createPartControl(Composite parent) {
  16.  
  17. FileDialog dlg = new FileDialog(parent.getShell(), SWT.OPEN);
  18. String fileName = dlg.open();
  19. if (fileName != null) {
  20. System.out.println(fileName);
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement