正在阅读:Java实现ftp功能Java实现ftp功能

2004-04-05 14:41 出处:Javajia 作者:Javajia 责任编辑:sdq

  public void stop()
  {
  try
  {
  aftp.closeServer();
  }
  catch(IOException e)
  {
  }
  }

  public void paint(Graphics g){
  }

  public boolean action(Event evt,Object obj)
  {
  if (evt.target == BtnConn)
  {
  LblPrompt.setText("正在连接,请等待.....");
  if (connect(TxtHost.getText(),TxtUID.getText(),TxtPWD.getText()))
  {
  BtnConn.setEnabled(false);
  BtnClose.setEnabled(true);
  }
  return true;
  }
  if (evt.target == BtnClose)
  {
  stop();
  BtnConn.enable(true);
  BtnClose.enable(false);
  LblPrompt.setText("与主机"+hostname+"连接已断开!");
  return true;
  }
  return super.action(evt,obj);
  }
  public boolean sendFile(String filepathname){
  boolean result=true;
  if (aftp != null)
  {
  LblPrompt.setText("正在粘贴文件,请耐心等待....");

察看评论详细内容 我要发表评论
作者笔名简短内容 发表时间
:

键盘也能翻页,试试“← →”键

相关文章

关注我们

最新资讯离线随时看 聊天吐槽赢奖品