these go together
public class periArea extends JFrame {
Container pane = getContentPane();
pane.add(row1);
pane.add(row2);
pane.add(row3);
and these go together
JFrame frame;
frame.setTitle("Area and Perimeter");
frame.setSize(400,400);
frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
frame.setVisible(true);
the two are not the same JFrame -
you should be able to work out the fix.
when fixed, your next question will be "only row3 shows" - JFrame's default
LayoutManager is BorderLayout - read the apidocs for BorderLayout to see how
multiple components should be added.