when i write the code as follows
class MyInner implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
if(txt1.getText().equals("") && txt2.getText().equals(""))//check listener
{
if (e.getActionCommand().equals("Result"))//button listener
{
//the required process to executed
int random= ((int)(50*Math.random()))+50;
txt3.setText(random+"%");
}
}
}
}
it does not print any thing
what is missing?
although i have called addactionlistener
what is the problem?