title: Saving String, then using it on another JFrame
body: <p>Currently using Swing to create a GUI, for a login system. I retrieve a couple things from the database, one is a String named Username, and one is a int, named points. I have a class, where I have all my getters and setters in, which is called DBHandler. Upon retrieving these values, I use:</p>
  
  <pre><code>public String getUsername() {
      return username;
  }
  
  public void setUsername(String username) {
      this.username = username;
  }
  
  public int getPoints() {
      return points;
  }
  
  public void setPoints(int points) {
      this.points = points;
  }
  </code></pre>
  
  <p>When I set these values (points is set inside the DBHandler.login method) using: </p>
  
  <pre><code>public login(){
      DBHandler db = new DBHandler();
      db.setUsername(usernameTemp.getText());
      db.login();
  </code></pre>
  
  <p>}</p>
  
  <p>However, when in another JFrame, that I call the instance of DBHandler, all values seem to be null. I use the getters to retrieve the values, but they are always empty.</p>
  
  <pre><code>public StudentScreen() {
      DBHandler db = new DBHandler();
      initComponents();
      showUser.setText(db.getUsername());
      showScore.setText("" + db.getPoints());
  }
  </code></pre>
  
  <p>I know this is a fairly simple problem, but I just haven't been able to get past this. I've checked a couple posts, but nothing helped understanding this issue.</p>
  
  <p>Best Regards</p>