import java.awt.Color;
import javax.swing.JButton;
import javax.swing.JRadioButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.ButtonGroup;


public class admin{
	JFrame admin=new JFrame("QUESTIONNAIRE");
	
	JLabel libelle = new JLabel("Question");
	JLabel choix = new JLabel("Réponse :");

	JTextField question = new JTextField(10); //ecrire dedans//
	JTextField reponse = new JTextField(10);
	
	JButton ad=new JButton("OK");
	
	
public admin()
   {
	frame();
   }


public void frame()
  {
	admin.setSize(600,400);
	admin.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	admin.setVisible(true);
	
	JPanel panel = new JPanel();
	panel.setBackground(Color.ORANGE);

	panel.add(libelle);
	
	
	
	//---------- Question ouverte------------//
	
	Question Q1 = new Question("");
	Q1.setDescription("Comment t'appelles-tu ?");
	JLabel Question1 = new JLabel(Q1.getDescription() );
	panel.add(Question1);
	
	panel.add(choix);
	panel.add(reponse);
	
	//--------- Questions fermées------------//
	

	
	//---------- QCM ------------//
	
	Question Q2 = new Question("");
	Q2.setDescription("Sexe");
	JLabel Question2 = new JLabel(Q2.getDescription() );
	panel.add(Question2);

	Rqcm rep = new Rqcm();
	
	rep.qcm();
	
   
	
	//---------Choix unique------------//
	
	Question Q3 = new Question("");
	Q1.setDescription("Sexe ?");
	JLabel Question3 = new JLabel(Q3.getDescription() );
	panel.add(Question3);
	
	JRadioButton option1 = new JRadioButton("Linux");
    JRadioButton option2 = new JRadioButton("Windows");
    JRadioButton option3 = new JRadioButton("Macintosh");

    ButtonGroup group = new ButtonGroup();
    group.add(option1);
    group.add(option2);
    group.add(option3);


    panel.add(option1);
    panel.add(option2);
    panel.add(option3);
	
	
	panel.add(ad);
	
	admin.add(panel);
  }
	



/*
	public static void main(String[] args) {
	// TODO Auto-generated method stub
     
		new admin();
		
		Rqcm rep = new Rqcm();
		System.out.println(rep.creerReponse());
		
	}
*/
}