I'm can you help me how to count my username and password using an array.
I confuse where should I put my counter inorder to up to 5.
Hope your Positive response.....
here is my code:
String[] username=new String[5];
String[] password=new String[5];
public void actionPerformed(ActionEvent e)
{
if(e.getSource().equals(btnAdd))
{
for(int i=0;i<5;i++)
{
username[i]=txtUsername.getText();
password[i]=txtPassword.getText();
}
MyTable table=new MyTable(username,password);
}
if(e.getSource().equals(btnExit)){ System.exit(0); }
}