このコード行があります。
class ButtonPanel extends JPanel implements ActionListener
{
public ButtonPanel()
{
yellowButton = new JButton("Yellow");
このようにjButtonのインスタンスを作成する前に、JavaはyellowButtonのタイプを知る必要があると思いましたか?
JButton yellowButton = new JButton("Yellow");
誰かがこれがどのように機能するか説明できますか?