无法将 JButton 添加到 JFrame

Unable to add a JButton to a JFrame

我正在关注这个 YouTube 教程 (https://www.youtube.com/watch?v=DFQzFJqOSbA&index=83&list=PLFE2CE09D83EE3E28),但我发现 add(lb) 带有红色下划线并出现以下错误:

类型 Container 中的方法 add(Component) 不适用于参数 (JButton)

我很困惑,因为 JButton 根据这个扩展了 Container http://docs.oracle.com/javase/7/docs/api/javax/swing/JButton.html 这不意味着它是一个有效参数吗?

我觉得我忽略了一些愚蠢的错误,感谢帮助。

import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;

public class Layout extends JFrame {
    private JButton lb;
    private JButton cb;
    private JButton rb;
    private FlowLayout layout;
    private Container container;

    public Layout() {
        super("title");
        layout = new FlowLayout();
        container = getContentPane();
        setLayout(layout);

        lb = new JButton("left");
        add(lb);
    }
}

当我将鼠标悬停在 lb = new JButton("left") 上时,弹出窗口会这样说...

Open Declaration javax.swing.JButton.JButton(String arg0)
@ConstructorProperties(value={"text"})

注意:此元素既没有附加源也没有附加 Javadoc,因此找不到 Javadoc。

编辑

我的导入行也有错误

The type javax.swing.JComponent cannot be resolved. 
It is indirectly referenced from required .class files

这里是我项目的截图

重新安装了较新的 eclipse 版本。