title: JFrame code not recognizing imported class object method & DB HashMap returned Object is null error
body: <p>So I'm parsing a row from an SQLite table to my GUI via a HashMap, but in the JFrame source code I'm getting errors.</p>
  <p>The first error is that the JFrame source code will not recognize an object as an instantiated object when I use the object name in the line directly following the object instance declaration.</p>
  <p>ViewPatient Class</p>
  <pre><code>package View;
  import Model.*;
  import Controller.*;
  import java.util.HashMap;
  
  public class ViewPatient extends javax.swing.JFrame {
      
          DBInteraction newDB = new DBInteraction();
          newDB.connect(); //error - '&lt;identifier&gt; expected &amp; package newDB does not exist'//
          HashMap&lt;String, Patient&gt; patientMap = newDB.SelectAllPatients();
          Patient newPatient = patientMap.get(txtfFullName.getText());
  
  }
  </code></pre>
  <p>DBInteraction Class connect() method I'm trying to use</p>
  <pre><code>public Connection connect() {
          //String variable containing the path of the database connection
          String url = &quot;jdbc:sqlite:hospital.db&quot;;
          //empty connection created
          Connection conn = null;
          try {
              conn = DriverManager.getConnection(url);
          } catch (SQLException e) {
              System.out.println(e.getMessage());
          }
          return conn;
      }
  </code></pre>
  <p>The second issue I'm running into is that when I attempt to access the ViewPatient JFrame I get an error stating:
  &quot;Error parsing timestamp
  NullPointerException because 
  is null&quot;
  (Or something along those lines)</p>
  <p>Any idea what might be going wrong?</p>