ان من المبتدئين في الجافا اتمنى احد يساعدني في اكتشاف الخطأ في هذا الكود
I.addActionListener(
new ActionListener()
{
public void actionPerformed(ActionEvent event)
{if(m.charAt(p)=='i')
{
x+="i";
answer_word.setText(x);
p++;
}else
JOptionPane.showMessageDialog(ScrambledWord .this,String.format("baaaad"));
}});
J.addActionListener(
new ActionListener()
{
public void actionPerformed(ActionEvent event)
{if(m.charAt(p)=='j')
{
x+="j";
answer_word.setText(x);
p++;
}else
JOptionPane.showMessageDialog(ScrambledWord .this,String.format("baaaad"));
}});