In my Swing application, the user must insert numbers and values, before switching to the next window. Now as a clean program should, I check every input if its valid or not
There are many things you can do. A simple one is to have a method that checks a list of strings for parseability into int. For additional checks you'd have more methods that check some typical thing, like number range. So split each kind of check into its own method and compose them as needed.
Otherwise there are full validation frameworks that handle this sort of thing. They are easiliy googlable, I'd say.