it is a program to find vowels from tect in awt....but it is not doing so may be some problem in if statement
import java.awt.*;
import java.awt.event.*;
class Test implements ActionListener
{
Frame fr;
TextField tf0,tf1;
Button b;
Test()
{
fr=new Frame();
fr.setLayout(null);
tf0=new TextField();
tf1=new TextField();
tf0.setBounds(30,40,100,20);
tf1.setBounds(30,80,50,20);
fr.add(tf0);
fr.add(tf1);
b=new Button("Calculate");
b.setBounds(25,240,100,20);
fr.add(b);
fr.setSize(300,300);
fr.setVisible(true);
b.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
if(e.getActionCommand().equals("Calculate"));
{
int v=0,k=0,l=0;
String st=tf0.getText();
String str[]=st.split("");
String vowels[]={"a","e","i","o","u"};
for(int i=0;i<str.length;i++)
{
for(int j=0;j<=4;j++)
if(str[i]== vowels[j]) //this statement is giveing output 0 even when vowels are available
v++;
}
String s1=Integer.toString(v);
tf1.setText(s1);
}
}
public static void main(String s[])
{
new Test();
}
}