Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.event.*;
- import javax.swing.*;
- import java.awt.*;
- public class LiveFeed extends JPanel implements GameEventListener{
- /**
- * Sets the final width and height of the window.
- * @param WIDTH Sets the width of the window.
- * @param HEIGHT sets the height of the window.
- */
- public static final int WIDTH = 530;
- public static final int HEIGHT = 170;
- public LiveFeed(){
- super();
- //Styling the JFrame window.
- setSize(WIDTH, HEIGHT); //Size of window.
- setLayout(new BorderLayout());
- JTextArea liveFeed = new JTextArea(5, 20);
- liveFeed.setBackground(Color.decode("#000000"));
- liveFeed.setPreferredSize(new Dimension(530,150));
- liveFeed.setForeground(Color.WHITE);
- add(liveFeed, BorderLayout.WEST);
- textField = new JTextField(10);
- textField.setBackground(Color.decode("#2c2c2c"));
- textField.setPreferredSize(new Dimension(530,20));
- textField.setBorder(BorderFactory.createEmptyBorder());
- textField.setForeground(Color.WHITE);
- add(textField, BorderLayout.SOUTH);
- }
- private JTextField textField;
- @Override
- public void pieceEaten(String pawnOut) {
- // TODO Auto-generated method stub
- }
- @Override
- public void playerTurn(String playerName) {
- System.out.println("Test");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement