Ejemplo n.º 1
0
  /** 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);
  }
Ejemplo n.º 2
0
 /**
  * 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();
 }
Ejemplo n.º 3
0
 /**
  * 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);
 }