انا حابة احد يساعدني في حل لهذا الكود
for(p=0;p<b.length;)
{
A.addActionListener(
new ActionListener()
{
public void actionPerformed(ActionEvent event)
{
if(bبسم الله الرحمن الرحيم=='a')
{
x+="a";
answer_word.setText(x);
p++;
}
else
for(int i=0;i<2;i++)
JOptionPane.showMessageDialog(ScrambledWord .this,String.format("baaaad"));
}});
I.addActionListener(
new ActionListener()
{
public void actionPerformed(ActionEvent event)
{
if(bبسم الله الرحمن الرحيم=='i')
{
x+="i";
answer_word.setText(x);
p++;}
else
{
for(int i=0;i<2;i++)
JOptionPane.showMessageDialog(ScrambledWord .this,String.format("baaaad"));
}
}});المطلوب منه انه ياخذ string من الuser عن طريق button ويقارنه ب string موجود حرف بحرف
