I am new to Java programming, and I have created 4 classes which use GridBagLayout, I then created 1 final class which collates all the other classes to be shown as one class.

The problem is the GUI classes show the GUI in center of page, the tabbed version show the GUI in top center of page, I dont like the look of this.

I was wandering if there is a way that I can get the JTabbedPane GUI's in the middle?

Below i will post the code of the class that collates all the GUI's together.

import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JTabbedPane;
import javax.swing.SwingUtilities;

public class main extends JFrame {

JTabbedPane tab = new JTabbedPane();
CustomerRegistration CR = new CustomerRegistration();
EquipmentHire EH = new EquipmentHire();
EquipmentRegistration ER = new EquipmentRegistration();

public main()
tab.add("Customer Registration", CR);
tab.add("Equipment Hire", EH);
tab.add("Equipment Registration", ER);

public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable(){
public void run(){
main m = new main();

ty for all your help