import javax.swing.*; import java.awt.*; import java.util.*; public class MyGUI extends JFrame{ public MyGUI(){ super("My GUI"); this.setLayout(new BorderLayout()); this.getContentPane().add(new JLabel("1"),BorderLayout.EAST); this.getContentPane().add(new JButton("Button"),BorderLayout.NORTH); this.getContentPane().add(new JLabel("2"),BorderLayout.WEST); this.getContentPane().add(new JButton("Button2"),BorderLayout.SOUTH); this.setJMenuBar(null); //init window properties setSize(60,50); setResizable(false); setDefaultCloseOperation(EXIT_ON_CLOSE); //Display the Window this.show(); } public static void main(){ MyGUI g = new MyGUI(); } }