【发布时间】:2018-08-19 02:33:44
【问题描述】:
成功登录后如何获得相同的名字?
我有一个用户类设置user.setName,在从登录JFrame和其他框架中的user.getName中的文本文件验证用户名和密码后,在主菜单中问候用户。
【问题讨论】:
-
1) 见The Use of Multiple JFrames, Good/Bad Practice? 在这种情况下,登录可能应该显示在
JOptionPane或JDialog中。 2) 为了尽快获得更好的帮助,请发帖minimal reproducible example 或Short, Self Contained, Correct Example。