java窗口输出 您所在的位置:网站首页 java窗口输出语句 java窗口输出

java窗口输出

2023-07-16 05:31| 来源: 网络整理| 查看: 265

满意答案

dcebd7a0de6265b6ccae5ead692f1eab.png

kjjvj

2013.09.04

dcebd7a0de6265b6ccae5ead692f1eab.png

采纳率:46%    等级:12

已帮助:9519人

import java.awt.*;

import java.awt.event.*;

public class Four extends Frame

implements WindowListener

{ Four(){

setBounds(150,150,300,300);

setVisible(true);

Label lb=new Label("Hello World!");

addWindowListener(this);

add(lb);

lb.setBounds(50,30,80,50); }

public void windowClosed(WindowEvent w)

{

System.exit(0);

}

public void windowClosing(WindowEvent w)

{

dispose();

}

public void windowOpened(WindowEvent e) {}

public void windowIconified(WindowEvent e) {}

public void windowDeiconified(WindowEvent e) {}

public void windowActivated(WindowEvent e) {}

public void windowDeactivated(WindowEvent e) {} public static void main(String[] args){

new Four();

}

}

00分享举报



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有