Java Swing — Asking for User Input (and creating a blocking thread) by popping up a JFrame

前端 未结 2 1192
傲寒
傲寒 2021-01-25 01:29

My top-level container is MainFrame (JFrame). I want to be able to popup another JFrame with a JPanel that has two JTextFields from MainFrame.

2条回答
  •  甜味超标
    2021-01-25 02:18

    Use a JDialog

    You can set it to be modal in this JDialog(Frame, modal) constructor

提交回复
热议问题