import java.awt.Frame;

import java.awt.Graphics;

import java.awt.Image;

import java.awt.Toolkit;


public class MyFrame extends Frame{

private Image img;

public MyFrame(){

Toolkit tk = Toolkit.getDefaultToolkit();

img = tk.getImage("res/pg.jpg");

}

public void paint(Graphics g){

super.paint(g);

int offy=0;

try {

for(int i=0; i<500; i++)

{

g.drawImage(img, 10,10, 510, 60,     0,0,500,50+offy,  this);

Thread.sleep(200);

offy+=10;

}

catch (InterruptedException e) 

{

e.printStackTrace();

}

}

}



import java.awt.Frame;

import java.awt.Graphics;

import java.awt.Image;

import java.awt.Toolkit;


public class MyFrame extends Frame{

private Image img; 

public MyFrame(){

Toolkit tk = Toolkit.getDefaultToolkit();

img = tk.getImage("res/nhnsvc.jpg");   //사진위치

}

public void paint(Graphics g){

String a = "ㅋㅋ";

super.paint(g);

g.drawLine(10, 20, 200, 200);

g.drawString(a, 50, 200 );

g.drawOval(20, 20, 300, 300);

g.drawImage(img, 10,10, this);

}

}



import java.awt.Frame;



public class Program {


public static void main(String[] args) 

{

Frame fm = new MyFrame();

fm.setVisible(true);

fm.setSize(1024,768);  //윈도우 사이즈

}


}



package com.newlecture.game;


public class RankingView {


public void print() {

System.out.println("1. ㅡㅡㅡㅡ");

}


}



package com.newlecture.game;


public class StatusBar {


private String stat;

public StatusBar()

{

this.stat="black";

}

public void print() 

{

System.out.println("turn : "+this.stat);

}

public void stat(String stat)

{

this.stat = stat;

}


}



+ Recent posts