Made panels and implemented the cardlayout