매니저/JAVA1

JAVA1 InherWindow 예제 (임시저장)

cdprkr2077 2011. 12. 23. 20:45


 

import java.awt.Frame;

// 2. 상속
class InherWindowEx extends Frame
{
 public InherWindowEx()
 {
  setVisible( true );
  setSize( 200, 300 );
 }

 public static void main(String[] args)
 {
  new InherWindowEx();
  

 }
}

/*
import java.awt.Frame;
class InherWindowEx
{
 public static void main(String[] args)
 {
  
  // 1. 객체 생성
  Frame f= new Frame( "상속연습" );

  f.setVisible( true );
  f.setSize( 200 , 300 );      // 가로 , 세로
  
 }
}
*/