/** Create the main window subviews. */ protected void makeContent() { messageTextField.setForeground(Color.red); JPanel centerPanel = new JPanel(new BorderLayout()); centerPanel.add(mainPanel, BorderLayout.CENTER); JPanel tmpP = new JPanel(new BorderLayout()); tmpP.add(messageTextField, BorderLayout.CENTER); tmpP.add(timePanel, BorderLayout.WEST); centerPanel.add(tmpP, BorderLayout.SOUTH); getContentPane().add(centerPanel, BorderLayout.CENTER); }
/** * Sets the JComponent that will be visible in the main window. * * @param component The new jComponent value */ void setJComponent(JComponent component) { mainPanel.removeAll(); if (component != null) { mainPanel.add(component, BorderLayout.CENTER); } getContentPane().validate(); getContentPane().repaint(); }
/** * Adds a time stamp text to the message field object * * @param time_txt The time stamp text */ protected void addTimeStamp(JTextField time_txt) { timePanel.add(time_txt, BorderLayout.CENTER); }