uploadFile(chooser.getSelectedFile(), chooser.getFilename());
if ( chooser.getSelectedFile()!=null && chooser.getFilename()!=null ) uploadFile(chooser.getSelectedFile(), chooser.getFilename());
    private void initUploadFile() {        SForm p = new SForm(new SFlowLayout());        p.setEncodingType("multipart/form-data");        final SFileChooser chooser = new SFileChooser();        p.add(chooser);        SButton submit = new SButton("upload");        submit.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent e) {                uploadFile(chooser.getSelectedFile(), chooser.getFilename());            } });        p.add(submit);        add(p, "UploadForm");    }