Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要为 JTable 重写一些方法。那么如何在我的代码中插入扩展的 JTable?如果在 jformdesigner 生成的代码中插入一些代码,稍后会被覆盖。在这种情况下怎么办?谢谢
首先,将元素添加为常规 JTable。然后,选择它,然后找到该class属性。按下小...按钮,IntelliJ 应该开始扫描您的项目文件以查找候选人(我认为它会查找任何继承了Swing-class 的内容。)我记得几年前我在找到我的班级时遇到了一些困难,到目前为止我记得我认为它需要一个可用的类的编译版本。我现在看到它扫描模块的类路径,所以target\classes在我的情况下,一些 maven 依赖项加上 -folders。因此,请确保它位于类路径中,并且您已经构建了项目,并且它应该可用。
class
...
Swing
target\classes