The constructor Timer(int, new ActionListener(){}) is undefined

报这个错很郁闷,因为在同一个包下另一个类中好好的,粘贴过来就报错了。按F3进入源码查看,点进去直接是类,而不是构造方法,ctrl+o查看其所有成员,发现并无该构造方法,只有一无参构造。遂怀疑是导包导错所致,果真。

The constructor Timer(int, new ActionListener(){}) is undefined

应该导入的是swing包下的,ctrl+shift+o默认导包导错所致。

相关文章:

  • 2022-12-23
  • 2021-08-18
  • 2021-09-19
  • 2022-12-23
  • 2021-10-06
  • 2022-12-23
  • 2022-12-23
  • 2021-06-04
猜你喜欢
  • 2021-06-11
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
相关资源
相似解决方案