The second line of the error message says you are trying to add a JLabel to what the third error line is reporting as a List of JButton objects.
错误消息的第二行表明,您尝试将一个JLabel添加到第三个错误行报告的JButton对象的List。
Given that, you're left with the third principle of error handling: error handling is informative.
下面是错误处理的第三个原则:错误处理要有告知性。
The third production of program lets the parser go past an error, search for a semicolon, and continue afterwards (normally an error would be fatal to the parser).
program 的第三个输出让这个分析程序可以获得错误,从中搜索分号,然后继续执行(通常错误对于解析器来说都是非常严重的)。
应用推荐