The first thing I want to say is that I’m brand new to
java so with that in mind here is my problem.
I have a small app that basically generates a random
string of characters that the user can use as a password. The length of the password can be defined by the user and here lies the problem. I want the input of the JTextfield to be restricted so that only numbers can be entered and that it’s limited to 3 characters. As it stands the code can do that, however it does not do it how I would like it to. The entire mask has to be filled in by the user, so for example the value 1 has to put in as 001 which is not what I want to be. Also it is possible to have gaps in between the numbers like 1 5 which causes it to error. I’ve removed it silently erroring by adding a workaround but all it does is that if that error happens it just defaults to 000.
i'll include class Genarate and class Copy just incase you want to run the entire app
thanks in advance for helping
sam