Swing 1, 95, 618, 52)); jLabelQuestion.setFont(新字体(“Comic Sans MS”,Font.BOLD,20)); jLabelQuestion.setForeground(颜色.黑色); 这个。设置大小(712500

Swing 1, 95, 618, 52)); jLabelQuestion.setFont(新字体(“Comic Sans MS”,Font.BOLD,20)); jLabelQuestion.setForeground(颜色.黑色); 这个。设置大小(712500,swing,Swing,1, 95, 618, 52)); jLabelQuestion.setFont(新字体(“Comic Sans MS”,Font.BOLD,20)); jLabelQuestion.setForeground(颜色.黑色); 这个。设置大小(712500); 此.setLayout(null); 这个.背景(颜色.白色); this.add(jLabelQuestion,null); this.add(jLabelScore,null); this.add(jLabelHeart1,null)

1, 95, 618, 52)); jLabelQuestion.setFont(新字体(“Comic Sans MS”,Font.BOLD,20)); jLabelQuestion.setForeground(颜色.黑色); 这个。设置大小(712500); 此.setLayout(null); 这个.背景(颜色.白色); this.add(jLabelQuestion,null); this.add(jLabelScore,null); this.add(jLabelHeart1,null); this.add(jLabelHeart2,null); this.add(jLabelHeart3,null); add(getJButtonAnswer1(),null); add(getJButtonAnswer2(),null); add(getJButtonAnswer3(),null); this.add(jLabelDescription1,null); this.add(jLabelDescription2,null); this.add(jLabelDescription3,null); add(getJButtonAdd(),null); this.add(jLabelTimer,null); this.add(jLabelScore1,null); this.add(jLabelQn,null); add(getJButtonEdit(),null); qn_num=1; 游戏问题g1=新游戏问题(qn_num); g1.retrieveGameQuestion(); jLabelQn.setText(“Q1”); jLabelQuestion.setText(g1.getG_question()); jLabelDescription1.setText(g1.getG_imageDescription1()); jLabelDescription2.setText(g1.getG_imageDescription2()); jLabelDescription3.setText(g1.getG_imageDescription3()); jButtonAnswer1.setIcon(新的ImageIcon(g1.getG_image1()); jButtonAnswer2.setIcon(新的ImageIcon(g1.getG_image2()); jButtonAnswer3.setIcon(新的ImageIcon(g1.getG_image3()); } /** *此方法初始化jButtonAnswer1 * *@return javax.swing.JButton */ 私有JButton getJButtonAnswer1(){ if(jButtonAnswer1==null){ jButtonAnswer1=新JButton(); jButtonAnswer1.退刀台(颜色:白色); jButtonAnswer1.设置尺寸(新尺寸(228214)); jButtonAnswer1.设置位置(新点(5164)); jButtonAnswer1.addActionListener(新java.awt.event.ActionListener(){ public void actionPerformed(java.awt.event.ActionEvent e){ jButtonAnswer1.等于(“answer1”); qn_num=qn_num+1; 游戏问题g1=新游戏问题(qn_num); g1.retrieveGameQuestion(); if((jButtonAnswer1.isSelected())&&&(g1.getG_correctAnswer()==answer1)) { jLabelQn.setText(“Q”+qn_num+”); jLabelQuestion.setText(g1.getG_question()); jLabelDescription1.setText(g1.getG_imageDescription1()); jButtonAnswer1.setIcon(新的ImageIcon(g1.getG_image1()); jLabelDescription2.setText(g1.getG_imageDescription2()); jLabelDescription3.setText(g1.getG_imageDescription3()); jButtonAnswer2.setIcon(新的ImageIcon(g1.getG_image2()); jButtonAnswer3.setIcon(新的ImageIcon(g1.getG_image3()); //jButtonAnswer1.removeAll(); } else if((jButtonAnswer1.isSelected())和&(g1.getG_correctAnswer()!=answer1)) { setIcon(新的ImageIcon(getClass().getResource(“/HealthOK/ui/images/explode.png”)); int延迟=100; 尝试 { 睡眠(延迟); } 捕捉(中断异常e1) { e1.printStackTrace(); } jLabelQn.setText(“Q”+qn_num+”); jLabelQuestion.setText(g1.getG_question()); jLabelDescription1.setText(g1.getG_imageDescription1()); jButtonAnswer1.setIcon(新的ImageIcon(g1.getG_image1()); jButtonAnswer1.removeAll(); jLabelDescription2.setText(g1.getG_imageDescription2()); jLabelDescription3.setText(g1.getG_imageDescription3()); jButtonAnswer2.setIcon(新的ImageIcon(g1.getG_image2()); jButtonAnswer3.setIcon(新的ImageIcon(g1.getG_image3()); } } }); } 返回jButtonAnswer1; } /** *此方法初始化jButtonAnswer2 * *@return javax.swing.JButton */ 私有JButton getJButtonAnswer2(){ if(jButtonAnswer2==null){ jButtonAnswer2=新JButton(); jButtonAnswer2.立根地面(颜色:白色); jButtonAnswer2.设置尺寸(新尺寸(228214)); jButtonAnswer2.设置位置(新点(240164)); jButtonAnswer2.addActionListener(新java.awt.event.ActionListener(){ public void actionPerformed(java.awt.event.ActionEvent e){ jButtonAnswer2.等于(“answer2”); qn_num=qn_num+1; 游戏问题g1=新游戏问题(qn_num); g1.retrieveGameQuestion(); if((jButtonAnswer2.isSelected())&&&(g1.getG_correctAnswer()==answer2)) { jLabelQn.setText(“Q”+qn_num+”); jLabelQuestion.setText(g1.getG_question()); jLabelDescription1.setText(g1.getG_imageDescription1()); jButtonAnswer1.setIcon(新的ImageIcon(g1.getG_image1()); jButtonAnswer1.removeAll(); jLabelDescription2.setText(g1.getG_imageDescription2()); jLabelDescription3.setText(g1.getG_imageDescription3()); jButtonAnswer2.setIcon(新的ImageIcon(g1.getG_image2()); jButtonAnswer3.setIcon(新的ImageIcon(g1.getG_image3()); } else if((jButtonAnswer2.isSelected())&&(g1.getG_correctAnswer()!=answer2)) { setIcon(新的ImageIcon(getClass().getResource(“/HealthOK/ui/images/explode.png”)); int延迟=100; 尝试 { 睡眠(延迟); } 捕捉(中断异常e1) { e1.printStackTrace(); } jLabelQn.setText(“Q”+qn_num+”); jLabelQuestion.setText(g1.getG_question()); jLabelDescription1.setText(g1.getG_imageDescription1()); jButtonAnswer1.setIcon(新的ImageIcon(g1.getG_image1()); jButtonAnswer1.removeAll(); jLabelDescription2.setText(g1.getG_imageDescription2()); jLabelDescription3.setText(g1.getG_imageDescription3()); jButtonAnswer2.setIcon(新的ImageIcon(g1.getG_image2()); jButtonAnswer3.setIcon(新的ImageIcon(g1.getG_image3()); } } }); } 返回jButtonAnswer2; } /** *此方法初始化jButtonAnswer3 * *@return javax.swing.JButton */ 私有JButton getJButtonAnswer3(){ if(jButtonAnswer3==null){ jButtonAnswer3=新JButton(); jButtonAnswer3.挫折背景(颜色:白色); jButtonAnswer3.设置尺寸(新尺寸(228214)); jButtonAnswer3.设置位置(新点(474163)); jButtonAnswer3.addActionListener(新java.awt.event.ActionListener(){ public void actionPerformed(java.awt.event.ActionEvent e){ jButtonAnswer3.等于(“answer3”); qn_num=qn_num+1; 游戏问题g1=新游戏问题(qn_num); g1.retrieveGameQuestion(); if((jButtonAnswer3.isSelected())&&&(g1.getG_correctAnswer()==answer3)) { jLabelQn.setText(“Q”+qn_num+”); jLabelQuestion.setText(g1.getG_question()); jLabelDescription1.setText(g1.getG_imageDescription1()); jButtonAnswer1.setIcon(新的ImageIcon(g1.getG_image1()); jButtonAnswer1.removeAll(); jLabelDescription2.setText(g1.getG_imageDescription2()); jLabelDescription3.setText(g1.getG_imageDescription3())
public class GamesQuestionPanel extends JPanel{

private static final long serialVersionUID = 1L;
private JLabel jLabelQuestion = null;
private JLabel jLabelScore = null;
private JLabel jLabelHeart1 = null;
private JLabel jLabelHeart2 = null;
private JLabel jLabelHeart3 = null;
private JButton jButtonAnswer1;
private JButton jButtonAnswer2;
private JButton jButtonAnswer3;
private JLabel jLabelDescription1;
private JLabel jLabelDescription2;
private JLabel jLabelDescription3;
private JButton jButtonAdd = null;
private JFrame myFrame = null;
private JLabel jLabelTimer = null;
private Timer t;
private TimerModel tm;
private int qn_num = 0;
private JLabel jLabelScore1 = null;
private JLabel jLabelQn;
private JButton jButtonEdit = null;
private static int answer1;
private int answer2;
private int answer3;
private int count=0;
int Score = 0;

public void Randomise() {
ArrayList<Integer> random = new ArrayList<Integer>();
try{
DBController db = new DBController();

//passing data source name
db.setUp("CFDatabase");
String g_question =" ";
String dbQuery = "SELECT * FROM GameQuestion WHERE g_question ='" + g_question + "'";

//for retrieve SQL use readRequest method
ResultSet rs = db.readRequest(dbQuery);

if (rs.next()){
int g_questionNo =rs.getInt("g_questionNo");
random.add(g_questionNo);
System.out.println(random.get(g_questionNo));
}

}
catch (Exception e)
{
e.printStackTrace();
}
}

/**
* This is the default constructor
*/
public GamesQuestionPanel() {
super();
initialize();
}

public GamesQuestionPanel(JFrame f) {
this();
myFrame = f;
}

public GamesQuestionPanel(JFrame f, String s ){
this();
myFrame = f;
jLabelTimer.setText(s);
}

/**
* This method initialises this
* 
* @return void
*/
private void initialize() {
jLabelQn = new JLabel();
jLabelQn.setBounds(new Rectangle(13, 96, 55, 50));
jLabelQn.setFont(new Font("Dialog", Font.BOLD, 18));
jLabelQn.setHorizontalAlignment(SwingConstants.CENTER);
jLabelQn.setHorizontalTextPosition(SwingConstants.CENTER);
jLabelQn.setText("");

jLabelScore1 = new JLabel();
jLabelScore1.setText("");
jLabelScore1.setSize(new Dimension(83, 29));
jLabelScore1.setLocation(new Point(119, 438));

jLabelTimer = new JLabel();
jLabelTimer.setBounds(new Rectangle(17, 23, 199, 53));
jLabelTimer.setText("00:01:00");
jLabelTimer.setHorizontalTextPosition(SwingConstants.CENTER);
jLabelTimer.setIcon(new ImageIcon(getClass().getResource("/HealthOK/ui/images/timerbg.png")));
jLabelTimer.setFont(new Font("Dialog", Font.BOLD, 18));
jLabelTimer.setHorizontalAlignment(SwingConstants.CENTER);
t = new Timer(1000, new java.awt.event.ActionListener(){
public void actionPerformed(java.awt.event.ActionEvent e) {
tm.timeTick();
jLabelTimer.setText(tm.getTime());
if(tm.isTimeUp()){
t.stop();
JOptionPane.showMessageDialog(null, "HighScore: " + Score, "GameOver",
JOptionPane.INFORMATION_MESSAGE);
int finalScore = Score ;
String display = Integer.toString(finalScore);
jLabelScore.setText(display);
tm.setTime("00:10:00"); 
JPanel panel = new ProgrammesEventsPanelEnq(myFrame);
myFrame.getContentPane().removeAll();
myFrame.getContentPane().add(panel);
myFrame.getContentPane().validate();
myFrame.getContentPane().repaint();
}
}
});
tm = new TimerModel();
tm.setTime("00:01:00");
t.start();

jLabelDescription3 = new JLabel();
jLabelDescription3.setFont(new Font("Dialog", Font.BOLD, 20));
jLabelDescription3.setLocation(new Point(483, 385));
jLabelDescription3.setSize(new Dimension(218, 33));
jLabelDescription3.setHorizontalAlignment(SwingConstants.CENTER);
jLabelDescription3.setHorizontalTextPosition(SwingConstants.CENTER);
jLabelDescription3.setForeground(Color.black);

jLabelDescription2 = new JLabel();
jLabelDescription2.setFont(new Font("Dialog", Font.BOLD, 20));
jLabelDescription2.setLocation(new Point(244, 386));
jLabelDescription2.setSize(new Dimension(226, 33));
jLabelDescription2.setHorizontalAlignment(SwingConstants.CENTER);
jLabelDescription2.setHorizontalTextPosition(SwingConstants.CENTER);
jLabelDescription2.setForeground(Color.black);

jLabelDescription1 = new JLabel();
jLabelDescription1.setFont(new Font("Dialog", Font.BOLD, 20));
jLabelDescription1.setBackground(new Color(238, 238, 238));
jLabelDescription1.setLocation(new Point(9, 386));
jLabelDescription1.setSize(new Dimension(225, 33));
jLabelDescription1.setHorizontalAlignment(SwingConstants.CENTER);
jLabelDescription1.setHorizontalTextPosition(SwingConstants.CENTER);
jLabelDescription1.setForeground(Color.black);

jLabelHeart3 = new JLabel();
jLabelHeart3.setBounds(new Rectangle(611, 61, 45, 39));
jLabelHeart3.setIcon(new ImageIcon(getClass().getResource("/HealthOK/ui/images/heartshape.png")));
jLabelHeart3.setText("");

jLabelHeart2 = new JLabel();
jLabelHeart2.setBounds(new Rectangle(546, 61, 43, 40));
jLabelHeart2.setIcon(new ImageIcon(getClass().getResource("/HealthOK/ui/images/heartshape.png")));
jLabelHeart2.setText("");

jLabelHeart1 = new JLabel();
jLabelHeart1.setBounds(new Rectangle(482, 60, 44, 41));
jLabelHeart1.setIcon(new ImageIcon(getClass().getResource("/HealthOK/ui/images/heartshape.png")));
jLabelHeart1.setText("");

jLabelScore = new JLabel();
jLabelScore.setBounds(new Rectangle(25, 438, 83, 29));
jLabelScore.setFont(new Font("Comic Sans MS", Font.BOLD, 20));
jLabelScore.setForeground(Color.black);
jLabelScore.setText(" Score:");

jLabelQuestion = new JLabel();
jLabelQuestion.setBounds(new Rectangle(71, 95, 618, 52));
jLabelQuestion.setFont(new Font("Comic Sans MS", Font.BOLD, 20));
jLabelQuestion.setForeground(Color.black);

this.setSize(712, 500);
this.setLayout(null);
this.setBackground(Color.white);
this.add(jLabelQuestion, null);
this.add(jLabelScore, null);
this.add(jLabelHeart1, null);
this.add(jLabelHeart2, null);
this.add(jLabelHeart3, null);
this.add(getJButtonAnswer1(), null);
this.add(getJButtonAnswer2(), null);
this.add(getJButtonAnswer3(), null);
this.add(jLabelDescription1, null);
this.add(jLabelDescription2, null);
this.add(jLabelDescription3, null);
this.add(getJButtonAdd(), null);
this.add(jLabelTimer, null);
this.add(jLabelScore1, null);
this.add(jLabelQn, null);
this.add(getJButtonEdit(), null);

qn_num = 1;
GameQuestion g1 = new GameQuestion(qn_num);
g1.retrieveGameQuestion();
jLabelQn.setText("Q1.");
jLabelQuestion.setText(g1.getG_question());
jLabelDescription1.setText(g1.getG_imageDescription1());
jLabelDescription2.setText(g1.getG_imageDescription2());
jLabelDescription3.setText(g1.getG_imageDescription3());
jButtonAnswer1.setIcon(new ImageIcon(g1.getG_image1()));
jButtonAnswer2.setIcon(new ImageIcon(g1.getG_image2()));
jButtonAnswer3.setIcon(new ImageIcon(g1.getG_image3()));

}

/**
* This method initialises jButtonAnswer1    
* 
* @return javax.swing.JButton   
*/
private JButton getJButtonAnswer1() {
if (jButtonAnswer1 == null) {
jButtonAnswer1 = new JButton();
jButtonAnswer1.setBackground(Color.white);
jButtonAnswer1.setSize(new Dimension(228, 214));
jButtonAnswer1.setLocation(new Point(5, 164));
jButtonAnswer1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
jButtonAnswer1.equals("answer1");
qn_num = qn_num + 1;
GameQuestion g1 = new GameQuestion(qn_num);
g1.retrieveGameQuestion();

if((jButtonAnswer1.isSelected()) && (g1.getG_correctAnswer() == answer1))
{
jLabelQn.setText("Q" + qn_num + ".");
jLabelQuestion.setText(g1.getG_question());
jLabelDescription1.setText(g1.getG_imageDescription1());
jButtonAnswer1.setIcon(new ImageIcon(g1.getG_image1()));
jLabelDescription2.setText(g1.getG_imageDescription2());
jLabelDescription3.setText(g1.getG_imageDescription3());
jButtonAnswer2.setIcon(new ImageIcon(g1.getG_image2()));
jButtonAnswer3.setIcon(new ImageIcon(g1.getG_image3())); 
//jButtonAnswer1.removeAll();
}
else if((jButtonAnswer1.isSelected()) && (g1.getG_correctAnswer() != answer1))
{
jButtonAnswer1.setIcon(new ImageIcon(getClass().getResource("/HealthOK/ui/images/explode.png")));
int delay = 100;
try
{
Thread.sleep(delay);
} 
catch (InterruptedException e1)
{
e1.printStackTrace();
}
jLabelQn.setText("Q" + qn_num + ".");
jLabelQuestion.setText(g1.getG_question());
jLabelDescription1.setText(g1.getG_imageDescription1());
jButtonAnswer1.setIcon(new ImageIcon(g1.getG_image1()));
jButtonAnswer1.removeAll();
jLabelDescription2.setText(g1.getG_imageDescription2());
jLabelDescription3.setText(g1.getG_imageDescription3());
jButtonAnswer2.setIcon(new ImageIcon(g1.getG_image2()));
jButtonAnswer3.setIcon(new ImageIcon(g1.getG_image3())); 
}
}
});
}
return jButtonAnswer1;
}

/**
* This method initialises jButtonAnswer2    
* 
* @return javax.swing.JButton   
*/
private JButton getJButtonAnswer2() {
if (jButtonAnswer2 == null) {
jButtonAnswer2 = new JButton();
jButtonAnswer2.setBackground(Color.white);
jButtonAnswer2.setSize(new Dimension(228, 214));
jButtonAnswer2.setLocation(new Point(240, 164));
jButtonAnswer2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
jButtonAnswer2.equals("answer2");
qn_num = qn_num + 1;
GameQuestion g1 = new GameQuestion(qn_num);
g1.retrieveGameQuestion();
if((jButtonAnswer2.isSelected()) && (g1.getG_correctAnswer() == answer2))
{
jLabelQn.setText("Q" + qn_num + ".");
jLabelQuestion.setText(g1.getG_question());
jLabelDescription1.setText(g1.getG_imageDescription1());
jButtonAnswer1.setIcon(new ImageIcon(g1.getG_image1()));
jButtonAnswer1.removeAll();
jLabelDescription2.setText(g1.getG_imageDescription2());
jLabelDescription3.setText(g1.getG_imageDescription3());
jButtonAnswer2.setIcon(new ImageIcon(g1.getG_image2()));
jButtonAnswer3.setIcon(new ImageIcon(g1.getG_image3())); 
}
else if((jButtonAnswer2.isSelected()) && (g1.getG_correctAnswer() != answer2))
{
jButtonAnswer2.setIcon(new ImageIcon(getClass().getResource("/HealthOK/ui/images/explode.png")));
int delay = 100;
try
{
Thread.sleep(delay);
} 
catch (InterruptedException e1)
{
e1.printStackTrace();
}
jLabelQn.setText("Q" + qn_num + ".");
jLabelQuestion.setText(g1.getG_question());
jLabelDescription1.setText(g1.getG_imageDescription1());
jButtonAnswer1.setIcon(new ImageIcon(g1.getG_image1()));
jButtonAnswer1.removeAll();
jLabelDescription2.setText(g1.getG_imageDescription2());
jLabelDescription3.setText(g1.getG_imageDescription3());
jButtonAnswer2.setIcon(new ImageIcon(g1.getG_image2()));
jButtonAnswer3.setIcon(new ImageIcon(g1.getG_image3())); 
}
}
});
}
return jButtonAnswer2;
}
/**
* This method initialises jButtonAnswer3    
* 
* @return javax.swing.JButton   
*/
private JButton getJButtonAnswer3() {
if (jButtonAnswer3 == null) {
jButtonAnswer3 = new JButton();
jButtonAnswer3.setBackground(Color.white);
jButtonAnswer3.setSize(new Dimension(228, 214));
jButtonAnswer3.setLocation(new Point(474, 163));
jButtonAnswer3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
jButtonAnswer3.equals("answer3");
qn_num = qn_num + 1;
GameQuestion g1 = new GameQuestion(qn_num);
g1.retrieveGameQuestion();
if((jButtonAnswer3.isSelected()) && (g1.getG_correctAnswer() == answer3))
{
jLabelQn.setText("Q" + qn_num + ".");
jLabelQuestion.setText(g1.getG_question());
jLabelDescription1.setText(g1.getG_imageDescription1());
jButtonAnswer1.setIcon(new ImageIcon(g1.getG_image1()));
jButtonAnswer1.removeAll();
jLabelDescription2.setText(g1.getG_imageDescription2());
jLabelDescription3.setText(g1.getG_imageDescription3());
jButtonAnswer2.setIcon(new ImageIcon(g1.getG_image2()));
jButtonAnswer3.setIcon(new ImageIcon(g1.getG_image3())); 
}
else if((jButtonAnswer3.isSelected()) && (g1.getG_correctAnswer() != answer3))
{
jButtonAnswer1.setIcon(new ImageIcon(getClass().getResource("/HealthOK/ui/images/explode.png")));
int delay = 100;
try
{
Thread.sleep(delay);
} 
catch (InterruptedException e1)
{
e1.printStackTrace();
}
jLabelQn.setText("Q" + qn_num + ".");
jLabelQuestion.setText(g1.getG_question());
jLabelDescription1.setText(g1.getG_imageDescription1());
jButtonAnswer1.setIcon(new ImageIcon(g1.getG_image1()));
jButtonAnswer1.removeAll();
jLabelDescription2.setText(g1.getG_imageDescription2());
jLabelDescription3.setText(g1.getG_imageDescription3());
jButtonAnswer2.setIcon(new ImageIcon(g1.getG_image2()));
jButtonAnswer3.setIcon(new ImageIcon(g1.getG_image3())); 
}
}
});
}
return jButtonAnswer3;
}
/**
* This method initializes jButtonEdit   
* 
* @return javax.swing.JButton   
*/
private JButton getJButtonAdd() {
if (jButtonAdd == null) {
jButtonAdd = new JButton();
jButtonAdd.setBounds(new Rectangle(591, 9, 90, 39));
jButtonAdd.setFont(new Font("Dialog", Font.BOLD, 16));
jButtonAdd.setText("Add");
jButtonAdd.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
t.stop();
JPanel panel = new GamesCreatePanel(myFrame);
myFrame.getContentPane().removeAll();
myFrame.getContentPane().add(panel);
myFrame.getContentPane().validate();
myFrame.getContentPane().repaint();

Object admin = null;
if(getName() == admin) {
jButtonAdd.setVisible(true);
}
else {
jButtonAdd.setVisible(false);
}
}
});
}
return jButtonAdd;
} 

/**
* This method initializes jButtonEdit   
* 
* @return javax.swing.JButton   
*/
private JButton getJButtonEdit() {
if (jButtonEdit == null) {
jButtonEdit = new JButton();
jButtonEdit.setPreferredSize(new Dimension(65, 31));
jButtonEdit.setSize(new Dimension(90, 39));
jButtonEdit.setText("Edit");
jButtonEdit.setFont(new Font("Dialog", Font.BOLD, 16));
jButtonEdit.setLocation(new Point(492, 9));
jButtonEdit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
t.stop();
String a = jLabelQuestion.getText();
String b = jButtonAnswer1.getText();
String c = jButtonAnswer2.getText();
String d = jButtonAnswer3.getText();
String f = jLabelDescription1.getText();
String g = jLabelDescription2.getText();
String h = jLabelDescription3.getText();
GameQuestion game = new GameQuestion();
game.setG_question(a);
game.setG_image1(b);
game.setG_image2(c);
game.setG_image3(d);
game.setG_imageDescription1(f);
game.setG_imageDescription2(g);
game.setG_imageDescription3(h);
JPanel panel = new GamesEditPanel(myFrame, a, game);
myFrame.getContentPane().removeAll();
myFrame.getContentPane().add(panel);
myFrame.getContentPane().validate();
myFrame.getContentPane().repaint();
}
});
}
return jButtonEdit;
}

}