package extractor.ui;

import javax.swing.JOptionPane;
import javax.swing.JDialog;
import javax.swing.JTextField;
import java.awt.*;
import java.awt.event.*;
import javax.swing.JFrame;
import ui.*;


class EJBStart extends JDialog {
	
  	ExtractResultsPanel ejbName = null;

    public EJBStart(Frame aFrame, ExtractResultsPanel ePanel)
    {
	        super(aFrame, true);	  	
	        this.ejbName = ePanel;
        
	        Object[] options = {"Back",
	                            "Next",
	                            "Cancel"};
	        int n = JOptionPane.showOptionDialog(aFrame,
	                        "entity bean 추출을 시작할까요 ???",
	                        "entity bean extraction",
	                        JOptionPane.YES_NO_CANCEL_OPTION,
	                        JOptionPane.QUESTION_MESSAGE,
	                        null,
	                        options,
	                        options[2]);
	        if (n == JOptionPane.YES_OPTION) { //back button
	            System.out.println("I'm the Back button");
	        } else if (n == JOptionPane.NO_OPTION) { //next button
	            System.out.println("I'm the Next button.");
          	    //eInputUI = new EInputUI(ejbName);
		    //centerPanel.removeAll();						
		    //centerPanel.add(eInputUI);			
		    //centerPanel.validate();
	        } else if (n == JOptionPane.CANCEL_OPTION) {//cancel button
	            System.out.println("I'm the Cancel button");
	            dispose();
	        } else {
	            System.out.println("Please tell me what you want!");
	        }
	}
    
    /*public static void main(String args[])
    {
    	new EJBStart(new JFrame());
    } */   
}
