Can someone explain to me SetFocusable(true) setFocusableTraversalKeysEnabled | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Can someone explain to me SetFocusable(true) setFocusableTraversalKeysEnabled

AddKeyListener(this); Why do we use “this” And what in the world does “setFocusable” mean

14th May 2018, 1:38 PM
Sage Mulkey
Sage Mulkey - avatar
1 Antwort
+ 2
As u might be knowing that, this keyword refers to the current object, so whenever we pass this in parameters of addKeyListener(), it searches for the implementation of the KeyListener Interface metgods in the same class of which we will be making object... Instead of this, you can also use the object of other classes which implements the KeyListener Interface..
4th Jul 2018, 5:02 PM
Jain Rishav Amit
Jain Rishav Amit - avatar