Java使窗口最小化为图标计算机等级考试
文章作者 100test 发表时间 2010:01:01 12:30:44
来源 100Test.Com百考试题网
最小化时隐藏,在图标上点右右键选择显示窗口时,让窗口显示出来
import java.awt.AWTException.
import java.awt.Image.
import java.awt.MenuItem.
import java.awt.SystemTray.
import java.awt.Toolkit.
import java.awt.TrayIcon.
import java.awt.event.ActionEvent.
import java.awt.event.ActionListener.
import java.awt.image.BufferedImage.
import java.io.File.
import java.io.IOException.
import javax.imageio.ImageIO.
public class SystemTrayTest extends Thread {
TrayIcon st.
SystemTray tray =null.
//javax.swing.Popup p.
java.awt.PopupMenu popup.
MenuItem mi1,mi2.
msgbox m=null.
public void getm(msgbox m){
this.m=m.
}