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

📄 imagecanvas.java

📁 java编写的sip协议软电话,结构非常清晰的SIP协议栈
💻 JAVA
字号:
package JavaPhoneTeam10;

import java.awt.*;

public class ImageCanvas extends Canvas
{
	Toolkit tool;
	Image img;
	int width;
	int height;
  	/**
   	 * Constructor, Creates new ImageCanvas
   	 */
	public ImageCanvas(String imgString, int w, int h)
	{
		this.width = w;
		this.height = h;
		setSize(w, h);
		tool = getToolkit();
		img = tool.getImage(imgString);
	}

  	/**
   	 * overide super's paint method, draw the specified image on the canvas
   	 */
	public void paint(Graphics g)
	{
		g.drawImage(img, 0, 0, width, height, this);
	}
}

⌨️ 快捷键说明

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