Package de.fh_mainz.awis.bruchmann

Source Code of de.fh_mainz.awis.bruchmann.StatusBar

package de.fh_mainz.awis.bruchmann;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.SystemColor;

import javax.swing.JLabel;
import javax.swing.JPanel;

/**
Statusbar der Oberflaeche:
In diesem Teil wird die Statusleite in der Oberflaeche ertellt
*/

@SuppressWarnings("serial")
public class StatusBar extends JPanel {
  static JLabel label;

 
  public StatusBar() {
      setLayout(new BorderLayout());
      setPreferredSize(new Dimension(10, 23));

      JPanel rightPanel = new JPanel(new BorderLayout());
      rightPanel.setOpaque(false);
      label = new JLabel("Spieler 1", JLabel.CENTER);
      //label.setText("Spieler 16");
      label.setHorizontalTextPosition(JLabel.CENTER);
      label.setForeground(Color.red);
      rightPanel.add(label);
      add(rightPanel, BorderLayout.CENTER);
      setBackground(SystemColor.control);
      rightPanel.repaint();
     
    }

  public static JLabel getLabel() {
    return label;
  }

  public static void setLabel(JLabel label) {
    StatusBar.label = label;
  }
}  
TOP

Related Classes of de.fh_mainz.awis.bruchmann.StatusBar

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.