使用IntelliJIDEA编写JAVASWING

设计好按钮之后,点alt+insert,选择form main自动生成代码的时候报了个错误

The form bound to the class does not have a valid binding for the root component

这个是因为JPanel没有添加名字

选择JPanel下面点击field name 添加一个name

The form bound to the class does not have a valid binding for the root component

再自动生成代码就不会报错了

相关文章: