java窗口输出 | 您所在的位置:网站首页 › java窗口输出语句 › java窗口输出 |
满意答案 kjjvj 2013.09.04 采纳率: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 实验室设备网 版权所有 |