Advertisement
Guest User

Untitled

a guest
Sep 12th, 2014
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.27 KB | None | 0 0
  1. import java.awt.event.*;
  2.  
  3. import javax.swing.*;
  4.  
  5. import java.awt.*;
  6.  
  7. public class LiveFeed extends JPanel implements GameEventListener{
  8.     /**
  9.      * Sets the final width and height of the window.
  10.      * @param WIDTH Sets the width of the window.
  11.      * @param HEIGHT sets the height of the window.
  12.      */
  13.     public static final int WIDTH = 530;
  14.     public static final int HEIGHT = 170;
  15.    
  16.     public LiveFeed(){
  17.         super();
  18.         //Styling the JFrame window.
  19.         setSize(WIDTH, HEIGHT); //Size of window.  
  20.         setLayout(new BorderLayout());
  21.        
  22.        
  23.         JTextArea liveFeed = new JTextArea(5, 20);
  24.         liveFeed.setBackground(Color.decode("#000000"));
  25.         liveFeed.setPreferredSize(new Dimension(530,150));
  26.         liveFeed.setForeground(Color.WHITE);
  27.         add(liveFeed, BorderLayout.WEST);
  28.        
  29.         textField = new JTextField(10);
  30.         textField.setBackground(Color.decode("#2c2c2c"));
  31.         textField.setPreferredSize(new Dimension(530,20));
  32.         textField.setBorder(BorderFactory.createEmptyBorder());
  33.         textField.setForeground(Color.WHITE);
  34.         add(textField, BorderLayout.SOUTH);
  35.     }  
  36.  
  37.        
  38.     private JTextField textField;
  39.  
  40.     @Override
  41.     public void pieceEaten(String pawnOut) {
  42.         // TODO Auto-generated method stub
  43.        
  44.     }
  45.  
  46.     @Override
  47.     public void playerTurn(String playerName) {
  48.         System.out.println("Test");
  49.        
  50.     }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement