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

您没有登录

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

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
reply to postflat 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);
  }
   }




话题树型展开
人气 标题 作者 字数 发贴时间
11411 请前辈评论applet编码风格,还能否优化 jiayuewei 670 2007-08-11 15:13
10511 Re:请前辈评论applet编码风格,还能否优化 jiayuewei 75 2007-08-11 15:23

reply to postflat 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-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923