Is it Possible to show a previously hidden JFrame using a keylistener

后端 未结 3 1761
野性不改
野性不改 2021-01-23 09:07

here is my code, i basically just did a tester for the most common listeners, which i might later use in future projects, the main problem is in the keylistener at the bottom, i

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-23 09:40

    As a general rule you should NOT be using a KeyListener. That was the old way of doing things when only AWT was around.

    When using Swing you should be using Key Bindings. The binding won't solve your problem with invisible components and frames but this is approach all Swing component use.

提交回复
热议问题