Advertisement
Guest User

StatusBar

a guest
Jun 7th, 2012
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.66 KB | None | 0 0
  1. package org.glhec.acd.robotm.ui;
  2.  
  3. import java.awt.FlowLayout;
  4.  
  5. import javax.swing.JLabel;
  6. import javax.swing.JPanel;
  7. import javax.swing.JSeparator;
  8.  
  9. public class StatusBar extends JPanel {
  10.     private static StatusBar instance = null;
  11.    
  12.     private StatusBar() {
  13.         setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0));
  14.         JPanel x = new JPanel();       
  15.         x.add(new JLabel("label 1 (x)"));
  16.        
  17.         JPanel y = new JPanel();       
  18.         y.add(new JLabel("label 1 (y)"));
  19.        
  20.         add(x);
  21.         add(new JSeparator(JSeparator.VERTICAL));
  22.         add(y);
  23.        
  24.     }
  25.    
  26.     public static StatusBar getInstance() {
  27.         if(instance == null)
  28.             instance = new StatusBar();
  29.        
  30.         return instance;
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement