I want to pass the JLabel to Integer, The following code does not work even with Integer.valueOf() and Integer.parse()
This are the following code I've Tried:
Test 1:
JLabel life = new JLabel("204");
int x = Integer.valueOf(life).intValue();
Test 2:
JLabel life = new JLabel("204");
int x = Integer.parseInt(life);