当前位置: 首页 > news >正文

网站专题栏目策划方案个人信息网站html

网站专题栏目策划方案,个人信息网站html,中核西北建设集团网站,wordpress会员vip插件其实这原本是一个有关java的基础话题#xff0c;不过既然有人提出来#xff0c;不妨说两句#xff0c;顺便也可做为初学者的一个参考。//1.窗体启动时最大化//Frame1.javaimport java.awt.*;import java.awt.event.*;import javax.swing.UIManager;public class Frame1 exte…其实这原本是一个有关java的基础话题不过既然有人提出来不妨说两句顺便也可做为初学者的一个参考。//1.窗体启动时最大化//Frame1.javaimport java.awt.*;import java.awt.event.*;import javax.swing.UIManager;public class Frame1 extends WindowAdapter{public Frame1() {Frame fnew Frame();f.addWindowListener(this);     //将Frame1设为f的事件处理者Dimension screenSize Toolkit.getDefaultToolkit().getScreenSize();     //得到屏幕的尺寸f.setLocation(0, 0);f.setSize(screenSize.width,screenSize.height);      //将窗体的尺寸设为屏幕的尺寸f.setVisible(true);}public static void main(String[] args) {new Frame1();}public void windowClosing(WindowEvent e) {System.exit(0);}}//2.关闭窗体的六种方法//2.1.使用JFrame的enableEvents和processWindowEvent//Frame1.javaimport java.awt.*;import java.awt.event.*;import javax.swing.*;public class Frame1 extends JFrame {public Frame1() {enableEvents(AWTEvent.WINDOW_EVENT_MASK);this.setSize(new Dimension(400, 300));this.setTitle(Frame1);}protected void processWindowEvent(WindowEvent e) {super.processWindowEvent(e);if (e.getID() WindowEvent.WINDOW_CLOSING) {System.exit(0);}}}//2.2.直接实现WindowListener接口//Frame1.javaimport java.awt.*;import java.awt.event.*;public class Frame1 extends Frame implements WindowListener {public Frame1() {this.setSize(new Dimension(400, 300));this.setTitle(Frame1);this.addWindowListener(this);}public void windowClosing(WindowEvent windowEvent) {System.exit(0);}public void windowOpened(WindowEvent windowEvent) {  }public void windowClosed(WindowEvent windowEvent) {  }public void windowIconified(WindowEvent windowEvent) {  }public void windowDeiconified(WindowEvent windowEvent) {  }public void windowActivated(WindowEvent windowEvent) {  }public void windowDeactivated(WindowEvent windowEvent) {  }}//2.3.直接继承窗体适配器WindowAdapter//Frame1.javaimport java.awt.*;import java.awt.event.*;public class Frame1 extends  WindowAdapter {public Frame1() {Frame fnew Frame();f.setSize(new Dimension(400, 300));f.setTitle(Frame1);f.addWindowListener(this);f.setVisible(true);}public static void main(String[] s){new Frame1();}public void windowClosing(WindowEvent windowEvent) {System.exit(0);}}//2.4.间接继承窗体适配器WindowAdapter//Frame1.javaimport java.awt.*;import java.awt.event.*;public class Frame1 extends  Frame {public Frame1() {this.setSize(new Dimension(400, 300));this.setTitle(Frame1);this.addWindowListener(new winAdapter());this.setVisible(true);}public static void main(String[] s){new Frame1();}}class winAdapter extends WindowAdapter{public void windowClosing(WindowEvent windowEvent) {System.exit(0);}}//2.5.间接实现WindowListener接口//Frame1.javaimport java.awt.*;import java.awt.event.*;public class Frame1 extends  Frame {public Frame1() {this.setSize(new Dimension(400, 300));this.setTitle(Frame1);this.addWindowListener(new winEventHandle());this.setVisible(true);}public static void main(String[] s){new Frame1();}}class winEventHandle implements WindowListener {public void windowClosing(WindowEvent windowEvent) {System.exit(0);}public void windowOpened(WindowEvent windowEvent) {  }public void windowClosed(WindowEvent windowEvent) {  }public void windowIconified(WindowEvent windowEvent) {  }public void windowDeiconified(WindowEvent windowEvent) {  }public void windowActivated(WindowEvent windowEvent) {  }public void windowDeactivated(WindowEvent windowEvent) {  }}//2.6.使用Inner Class//Frame1.javaimport java.awt.*;import java.awt.event.*;public class Frame1{public Frame1(){Frame fnew Frame();f.addWindowListener(new WindowAdapter(){public void windowClosing(WindowEvent e){System.exit(0);}});f.setSize(new Dimension(400, 300));f.setVisible(true);}public static void main(String[] s){new Frame1();}
http://www.sadfv.cn/news/253013/

相关文章:

  • 三明网站设计功能型网站设计
  • 包装纸箱怎么做网站中交通力建设股份有限公司网站
  • 新公司做网站怎么弄vi平面设计公司
  • 永州高端网站建设网站建设涉及的标准
  • 东莞做网站优化河南招标投标信息网
  • 网站建设app备案号查询平台官网
  • 北京微网站建设设计服务公司东莞网站建设少儿托管
  • 温州网站改版做系统的网站
  • 毕业设计网页制作咖啡网站图片腾讯和中国联通
  • 做网站开发app邯郸专业网站建设报价
  • 怎样发掘网站建设的客户网络营销的概念和界定
  • 金华做网站最专业的公司php企业网站系统
  • 虐做视频网站google全球推广
  • 做宠物服务的相关网站抚顺做网站
  • 公司网站排名优化手段哪个网站做化妆品效果好
  • 怎样在手机做自己的网站wordpress 目录迁移
  • 北京建站公司做网站价格网站后台编辑器内容不显示
  • 翼讯自助网站公司内部网站管理系统
  • 网站建设手机登录密码是什么啊抖音seo推广外包公司好做吗
  • 网站建设管理的规章制度做外贸的国际网站有哪些
  • 建设银行网站查询工资室内装修效果图网站有哪些
  • 网站建设一般的长宽wordpress把写博客按钮放在前台
  • led网站制作课程网站建设论文
  • 开滦建设集团网站整站关键词排名优化
  • 舆情网站推荐长沙网络营销首选智投未来
  • wps的ppt做网站超链接网络营销做私活网站
  • 手机网站底部导航企业建设网站 入账
  • 长沙网站优化收费sever2012 网站建设
  • 想自己做网站 有免费的吗免费学ps的网站有哪些
  • wordpress仿站博客视频群晖可以做网站吗