daily pastebin goal
20%
SHARE
TWEET

Untitled

a guest Mar 8th, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package livestream;
  2.  
  3. import java.awt.BorderLayout;
  4. import java.awt.Dimension;
  5. import java.awt.LayoutManager;
  6. import javax.swing.JButton;
  7. import javax.swing.JFrame;
  8. import javax.swing.JPasswordField;
  9. import javax.swing.JTextArea;
  10.  
  11. public class Frame extends JFrame
  12. {
  13.     public LayoutManager borderLayout = new BorderLayout();
  14.    
  15.     public void init()
  16.     {
  17.         setTitle("Livestream");
  18.        
  19.         setSize(new Dimension(500, 500));
  20.        
  21.         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  22.         setVisible(true);
  23.     }
  24.    
  25.     public void makeLoginScreen()
  26.     {
  27.         JTextArea loginName = new JTextArea();
  28.         JPasswordField loginPassword = new JPasswordField();
  29.         JButton loginButton = new JButton("Login");
  30.        
  31.         loginName.setPreferredSize(new Dimension(50, 50));
  32.         loginPassword.setPreferredSize(new Dimension(50, 50));
  33.         loginButton.setPreferredSize(new Dimension(100, 100));
  34.        
  35.         this.add(loginName, BorderLayout.PAGE_START);
  36.         this.add(loginPassword, BorderLayout.CENTER);
  37.         this.add(loginButton, BorderLayout.PAGE_END);
  38.        
  39.     }
  40. }
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