Update TheMainPanel.java

Updated the MainPanel to handle the connection to the database