Can someone explain to me SetFocusable(true) setFocusableTraversalKeysEnabled | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Resposta
+ 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