I want to count the number of times the button is clicked using GUI.
I did this code:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)
{
int clicked = 0;
clicked++;
System.out.println(clicked);
}
But it showing the output "1", each time I click the button.
I want every time I click the button to show me the count.
ex: If I click the button two times it should give me output of "2".