I need help with java random in generator code .It’s a button that when entered generates 8 digit random numbers .
where to add the functionality in the button and how to add it should i declare in random in the function method or in the main method.
am stuck here because am using neteans swing
generateButton.addActionListener(new ActionListener() {
<code> public void actionPerformed(ActionEvent e) {
generateID();
}
});
</code>
<code> public void actionPerformed(ActionEvent e) {
generateID();
}
});
</code>
public void actionPerformed(ActionEvent e) {
generateID();
}
});