private void setupConvoPanel() { convoPanel = new JPanel(); convoPanel.setLayout(new BorderLayout()); convoPanel.setBackground(BACKGROUND); convoList = new EntryPanel(this); convoList.PANEL.setBackground(BACKGROUND); convoList.PANEL.setForeground(new Color(255, 69, 0)); convoList.enforceSingleSelection(true); convoControlPanel = new JPanel(); convoTitle = new CstmTextField("", "Enter Convo Name"); joinConvo = new CstmButton("JOIN", "Join Convo"); joinConvo.addMouseListener(this); startConvo = new CstmButton("START", "Start Convo"); startConvo.addMouseListener(this); convoControlPanel.setLayout(new BorderLayout()); convoControlPanel.add(convoTitle, BorderLayout.CENTER); convoControlPanel.add(joinConvo, BorderLayout.WEST); convoControlPanel.add(startConvo, BorderLayout.EAST); convoListPane = new JScrollPane(convoList.PANEL); convoPanel.add(convoListPane, BorderLayout.CENTER); convoPanel.add(convoControlPanel, BorderLayout.SOUTH); }
private void setupUserPanel() { userPanel = new JPanel(); userPanel.setLayout(new BorderLayout()); userPanel.setBackground(BACKGROUND); peepLists = new HashMap<String, EntryPanel>(); peepListPane = new JScrollPane(); userControlPanel = new JPanel(); userControlPanel.setBackground(BACKGROUND); userControlPanel.setLayout(new BorderLayout()); leaveConvo = new CstmButton("LEAVE", "Leave Convo"); leaveConvo.addMouseListener(this); userControlPanel.add(leaveConvo, BorderLayout.CENTER); userPanel.add(peepListPane, BorderLayout.CENTER); userPanel.add(userControlPanel, BorderLayout.SOUTH); }