SHARE
TWEET

Untitled

a guest Dec 13th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package view;
  2.  
  3. import java.awt.BorderLayout;
  4. import java.awt.Dimension;
  5. import java.awt.GridBagConstraints;
  6. import java.awt.GridBagLayout;
  7. import java.awt.Insets;
  8.  
  9. import javax.swing.JLabel;
  10. import javax.swing.JPanel;
  11.  
  12. public class MyStatusBar extends JPanel {
  13.    
  14.     private JLabel lblStatus;
  15.     private JPanel pnlContent;
  16.    
  17.     public MyStatusBar() {
  18.         initGUI();
  19.         consturctGUI();
  20.     }
  21.    
  22.     public void initGUI() {
  23.         setPreferredSize(new Dimension(100, 20));
  24.         setLayout(new BorderLayout());
  25.        
  26.         pnlContent = new JPanel(new GridBagLayout());
  27.         lblStatus = new JLabel();
  28.     }
  29.    
  30.     public void consturctGUI() {
  31.         pnlContent.add(lblStatus, new GridBagConstraints(0, 0, 1, 1, 100, 0, GridBagConstraints.WEST,
  32.                 GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
  33.         //new GridBagConst
  34.         add(pnlContent, BorderLayout.CENTER);
  35.    
  36.     }
  37.  
  38.     public JLabel getLblStatus() {
  39.         return lblStatus;
  40.     }
  41.  
  42.  
  43.     public void setLblStatus(JLabel lblStatus) {
  44.         this.lblStatus = lblStatus;
  45.     }
  46.    
  47.    
  48. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top