JAVA 프로그래밍

문제

열쇠를 어디에 두었는지 찾는 게임입니다 이를 해결하는 다음 프로그램에 대해 빈칸을 채우세요 
 

코드 빈칸 채우기

import java.awt.*; 
import javax.swing.*; 
	 
public class FindKeyGameMain 
{ 
	public static void main(String args[]) { 
		String[][] questions = { 
				{ "1", "열쇠를 찾아라!", "시작" }, 
				{ "2", "<html>약속이 있어서 나가야 하는데 차 키가 없다<br>열쇠는 어디에 있을까?<br> </html>", "문 밖으로 나간다", "여기서 찾아본다", "4" }, 
				{ "3", "<html>거실에 TV와 화분이 보인다<br>열쇠는 어디에 있을까?<br> </html>", "이전으로", "화분 주변", "6" }, 
				{ "4", "<html>서재에 책장과 책상이 보인다<br>열쇠는 어디에 있을까?<br> </html>", "책상 위", "책장 선반", "6" }, 
				{ "5", "열쇠 찾기 성공!", "처음으로" }, 
				{ "6", "열쇠 찾기 실패!", "처음으로" }, 
		}; 
		 
		final  frame = new ( "열쇠찾기" ); 
		final  cards = new ( 20, 20 ); 
		frame.( cards ); 
		for( String[] question : questions ) 
			frame.add( new QuestionPanel( frame.getContentPane(), cards, question ), question[0] ); 
		frame.setPreferredSize( new Dimension( 400,250 ) ); 
		frame.setDefaultCloseOperation( .EXIT_ON_CLOSE ); 
		frame.pack(); 
		frame.setVisible(true); 
	} 
} 
import java.awt.*; 
import java.awt.event.*; 
import javax.swing.*; 
 
public class QuestionPanel    
{ 
	private  option1, option2; 
	private String nextOption2; 
	private  frame; 
	private  cards; 
	 
	public QuestionPanel(  frame,  cards, String[] question ) { 
		( new ( 3, 1 ) ); 
		 label = new ( question[1] ); 
		label.setFont( new Font( "굴림", Font.BOLD, 17 ) ); 
		add( label ); 
		 
		ClickListener click = new ClickListener(); 
		if( ( question.length > 2 ) && ( question[2] != null ) && !question[2].equals("") ) { 
			option1 = new ( question[2] ); 
			option1.setFont( new Font( "굴림", Font.BOLD, 17 ) ); 
			option1.( click ); 
			add( option1 ); 
		} 
		 
		if( ( question.length > 4 ) && ( question[3] != null ) && !question[3].equals("") ) { 
			option2 = new ( question[3] ); 
			option2.setFont( new Font( "굴림", Font.BOLD, 17 ) ); 
			option2.( click ); 
			add( option2 ); 
			nextOption2 = question[4]; 
		} 
		 
		this.frame = frame; 
		this.cards= cards; 
	} 
	 
	private class ClickListener   { 
		public void (  event ) { 
			if ( ( event.() == option1 ) && ( option1.().equals( "처음으로" ) ) ) { 
				option1.setSelected( false ); 
				cards.( frame ); 
			} 
			else if ( ( event.() == option1 ) && ( option1.().equals( "이전으로" ) ) ) { 
				option1.setSelected( false ); 
				cards.( frame ); 
			} 
			else if ( event.() == option1 ) { 
				option1.setSelected( false ); 
				cards.( frame ); 
			} 
			else if ( event.() == option2 ) { 
				option2.setSelected( false ); 
				cards.( frame, nextOption2 ); 
			} 
		} 
	} 
}