Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java程序分享区  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
reply to topicflat modethreaded modego to previous topicgo to next topicgo to back
作者 请前辈评论applet编码风格,还能否优化
jiayuewei





发贴: 2
于 2007-08-11 15:13 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class Button extends JApplet {
private static final long serialVersionUID=123456L
  
  JButton b1 = new JButton("向左走");
  JButton b2 = new JButton("向右走");
  
  
public void init() {
   this.getContentPane();
   run(this);
   this.setVisible(true);
  }

  public void run(JApplet applet) {
  
   container();
   JFrame frame = new JFrame();
   frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
//响应关闭按钮

   }

  private void container() {
    Container cp = getContentPane();
    cp.setLayout(new FlowLayout());
    cp.add(b1);
    cp.add(b2);
  }
   }



作者 Re:请前辈评论applet编码风格,还能否优化 [Re:jiayuewei]
jiayuewei





发贴: 2
于 2007-08-11 15:23 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
这段程序,在eclipse中运行正常,而在命令行中不报错,但也无显示,在ie中报 Button notinited 错误,请高手帮忙解决.......



reply to topicflat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2018 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号
客服电话 0592-8750026    客服信箱 714923@qq.com    客服QQ 714923