title: Login screen in JFrame
body: <p>I am trying to create a JFrame login screen in Java. I have searched the internet and only found things on Netbeans which I do not want to use because I would like to make it entirely in code.</p>
  
  <p>It would need to be that you could not see the usernames and passwords just by looking at the code.</p>
  
  <p>I have created a JFrame:</p>
  
  <pre><code>JFrame launcher = new JFrame("Login");
  </code></pre>
  
  <p>And some widgets:</p>
  
  <pre><code>JTextField User = new JTextField("Username");
  JPasswordField Pass = new JPasswordField("Password");
  JButton Login = new JButton("Login");
  </code></pre>
  
  <p>But every time i do:</p>
  
  <pre><code>launcher.add(User)
  launcher.add(Pass)
  launcher.add(Login)
  </code></pre>
  
  <p>The Login button would coveer the entire window.</p>
  
  <p>So here is the pseudo code of what I'm trying to do:</p>
  
  <pre><code>Login = create new button
  Pass = create new Password Field
  User = create new Text Field
  Check = 0
  
  add User at top of window
  add Pass at middle of window
  add Login at bottom of window
  
  if Pass input == any password from list then {
       Check = Check + 1
  }
  
  if User input == any username from list then {
       Check = Check + 1
  }
  
  if Check == 2 {
       Change to new class
  }else{
       Show on screen "INVALID" then restart
   }
  </code></pre>