Using scanner class with a GUI

前端 未结 2 396
说谎
说谎 2021-01-27 20:31

I\'m using java swing to create my GUI and using the scanner class to get the information inputted from the JTextFields across to the server. is this possible and if so how?

2条回答
  •  离开以前
    2021-01-27 21:15

    No. There is no console, so don't use Scanner. Instead get text when you need it by using TextField's getText() method.

提交回复
热议问题