⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gui_about.java

📁 這是一個8051的模擬器 以java寫成
💻 JAVA
字号:
import java.awt.*;import java.awt.event.*;import java.awt.image.*;import java.io.*;import java.net.*;import javax.imageio.ImageIO;import javax.swing.*;/** * Projet de langage JAVA IFITEP 3 2005 - Simulateur 8051  * <p>  * GUI_About *   * @author Matthieu SIMON * @version 1.0 du 28/06/05 */public class GUI_About extends JWindow {	private BufferedImage image = null;	public GUI_About(String file) {		super();		URL url = getClass().getResource(file);		try{			image = ImageIO.read(url);			setSize(new Dimension(image.getWidth(), image.getHeight()));			setLocationRelativeTo(null);			setVisible(true);		}catch(IOException ioe){			System.out.println(ioe.getMessage());		}		addMouseListener(new MouseAdapter() {			public void mouseClicked(MouseEvent e) {				dispose();			}		});	}		public void paint(Graphics g){		if(image.getColorModel().hasAlpha()){			try{				Robot robot = new Robot();				BufferedImage fond = robot.createScreenCapture(getBounds());				MediaTracker tracker = new MediaTracker(this);				tracker.addImage(fond,0);				tracker.waitForAll();				g.drawImage(fond, 0,0,null);			}catch(Exception e){e.printStackTrace();}		}		g.drawImage(image,0,0,null);	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -