How to wait for a JFrame to close before continuing?

佐手、 提交于 2019-11-28 13:42:29
  • Why must the login appear on the task bar, since the main app will be there, and you don't want more than one task bar item for an individual program. Your best option may be to use a modal JDialog.
  • Another option is to use CardLayout to swap "views".
  • A third option is to use a JFrame if you must but attach a listener to it, a WindowListener I believe, to respond to its close event.
  • Regardless of which route you go, your login gui should be a JPanel so that you can place it anywhere you wish and then change your mind later.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!