My components dont show until I resize the frame.
public class Frame extends JFrame{ private final static int WIDTH=400, HEIGHT=400; public Frame(){ super(); super.setSize(WIDTH,HEIGHT); super.setVisible(true); super.setDefaultCloseOperation(EXIT_ON_CLOSE); } }
In my main class I am just creating the frame and the panel then adding the panel to the frame.public class Panel extends JPanel{ private JTextField name; public Panel(){ super.setLayout(new BorderLayout()); DrinkName = new JTextField(20); this.add(DrinkName, BorderLayout.SOUTH); } }