I am trying to add multiple panels to a JFrame. I have set a content pane and added both panels to this pain yet only 1 is out putted.
GraphicsPanel gp = new GraphicsPanel();
JPanel main = new JPanel();
TextPanel tp = new TextPanel();
tp.setVisible(true);
gp.setVisible(true);
main.setLayout(new GridLayout(0, 2));
main.add(tp);
main.add(gp);
MenuDriver me = new MenuDriver();
me.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
me.setVisible(true);
me.setContentPane(main);