/**
 * Part of Employ
 */

import java.awt.*;
import javax.swing.*;

public abstract class CommonFrame extends JFrame {

  JPanel panelHeading;
  JLabel labelHeading;

  // define common settings for all frame
  public CommonFrame(String heading) {
    super("Employ - " + heading);

    setSize(400, 200);
    setResizable(false);
    setLocationRelativeTo(null);
    setLayout(new FlowLayout());

    panelHeading = new JPanel();
    labelHeading = new JLabel(heading);

    add(panelHeading);
    add(labelHeading);

    setDefaultCloseOperation(EXIT_ON_CLOSE);
  }

}


@@ -24,27 +24,8 @@
 */%0A%0A
-import java.awt.*;%0A
 impo
@@ -120,31 +120,23 @@
 ding
-;%0A  JLabel labelHeading
+ = new JPanel()
 ;%0A%0A 
@@ -353,61 +353,68 @@
 new 
-Flow
+Box
 Layout(
-));%0A%0A    panelHeading = new J
+getContent
 Pane
-l
 ()
+, BoxLayout.Y_AXIS))
 ;%0A
+%0A
     
+JLabel 
 labe
@@ -449,20 +449,32 @@
 g);%0A
-%0A
     
+panelHeading.
 add(
-pan
+lab
 elHe
@@ -485,27 +485,27 @@
 g);%0A    add(
-lab
+pan
 elHeading);%0A

Use BoxLayout for better component arrangement