자바 SWT에서요..

widgie의 이미지

어떤 버튼을 눌렀을때 FileDialog가 뜨게 하는거

이렇게 해주면 되는거 아닌가요?

ftp가 버튼이름 이름입니다.

ftp.addSelectionListener(new SelectionAdapter() {
    public void widgetSelected(SelectionEvent e) {
           FileDialog dialog = new FileDialog(sShell, SWT.OPEN);
    }
});

익명 사용자의 이미지


ftp.addSelectionListener(new SelectionAdapter() {
    public void widgetSelected(SelectionEvent e) {
           FileDialog dialog = new FileDialog(sShell, SWT.OPEN);
           dialog.open();
           String[] path = dialog.getFileNames();//or String path = dialog.getFileName();
    }
});
widgie의 이미지

감사합니다 :oops:
open을 안했군요 ㅋㅋ