I'm facing following problem: I have to give names to many thousands of GUI-Elements. Would be nice if it could work a script like:
JMenuItem myMenuItem = new JMenuItem();
myMenuItem .setName(this.getClass().getSimplename() + "." + myMenuItem .get??)
Would be nice if I could set the name of the element to "Classname.myMenuItem".
Is there any way to get the name (variable name ofc, not JMenuItem.getName()) of the variable?