更新时间:2023-12-03 14:12:22
EmployeeGUI
继承自 JFrame
,但是在你的 main
方法中,你正在创建一个新的 JFrame
并尝试向其中添加 EmployeeGUI
的实例.
EmployeeGUI
extends from JFrame
, but in your main
method, you are creating a new JFrame
and are trying to add an instance of EmployeeGUI
to it.
更改 EmployeeGUI
使其从 JPanel
扩展而不是
Change EmployeeGUI
so it extends from JPanel
instead