?? client.java
字號:
package com.javapatterns.proxy.imageloader;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.JFrame;
import javax.swing.Icon;
public class Client extends JFrame
{
private static int IMAGE_WIDTH = 270;
private static int IMAGE_HEIGHT = 380;
private Icon imageIconProxy = null;
static public void main(String[] args)
{
Client app = new Client();
app.show();
}
public Client()
{
super("Virtual Proxy Client");
imageIconProxy = new ImageIconProxy("c:/hongyan.jpg", IMAGE_WIDTH, IMAGE_HEIGHT);
setBounds(100, 100, IMAGE_WIDTH + 10, IMAGE_HEIGHT + 30);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public void paint(Graphics g)
{
super.paint(g);
Insets insets = getInsets();
imageIconProxy.paintIcon(this, g, insets.left , insets.top);
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -