This question has already been answered:
Example from the textbook.
JFrame frame =new JFrame(); Jbatton batton = new JButton(); **frame.getContentPane().add(button);** Who calls the add() method? I understand this is a method from the Object class?
Is this line equal to the next record?
с= frame.getContentPane(); c.add(button);