import java.awt.*; import java.awt.event.*; import java.applet.*; import oracle.jdeveloper.layout.*; //import ftp.FtpBean; public class FTPClient extends Applet { XYLayout xYLayout1 = new XYLayout(); boolean isStandalone = false; // FtpBean fb = new FtpBean(); Button button1 = new Button(); //Get a parameter value public String getParameter(String key, String def) { return isStandalone ? System.getProperty(key, def) : (getParameter(key) != null ? getParameter(key) : def); } //Construct the applet public FTPClient() { } //Initialize the applet public void init() { try { jbInit(); } catch (Exception e) { e.printStackTrace(); } } //Component initialization private void jbInit() throws Exception { xYLayout1.setWidth(400); xYLayout1.setHeight(300); button1.setLabel("Get/Put File"); button1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { button1_actionPerformed(e); } }); this.setLayout(xYLayout1); this.setBackground(SystemColor.control); this.add(button1, new XYConstraints(87, 133, 170, -1)); } //Get Applet information public String getAppletInfo() { return "Applet Information"; } //Get parameter info public String[][] getParameterInfo() { return null; } void button1_actionPerformed(ActionEvent e) { try{ System.out.println("Hi"); fb.ftpConnect("ss.sarbjeet", "anonymous", "d@e.com"); fb.setDirectory("mdm"); fb.putBinaryFile("c:/mdm/TryAccess.java","123.12"); fb.close(); } catch(Exception ex){;} } }