Setting component focus in JOptionPane.showOptionDialog()

前端 未结 8 1532
广开言路
广开言路 2020-12-10 13:59

In order to have custom button captions in an input dialog, I created the following code:

String key = null;
JTextField txtKey = new JTextField();        
in         


        
8条回答
  •  孤街浪徒
    2020-12-10 14:26

    Dialog Focus shows how you can easily set the focus on any component in a modal dialog.

提交回复
热议问题