The demo program I included was for a stand alone Java application (it runs outside of the Robot code and outside of the SmartDashboard).
It sounds like you are creating a SmartDashboard extension (plugin) module that is loaded by the SmartDashboard and run inside the SmartDashboard. If this is the case, then my guess is that the SmartDashboard has already set up and constructed the single instance of the NetworkTable connection object.
If you want to update values in a network table, my assumption is that you would skip all of the initialization steps and just grab the table you want to work with when you want to put a value out (similar to what you would do in Robot code). Something like:
Code:
NetworkTable table = NetworkTable.getTable("SmartDashboard");
table.putBoolean("FoundTarget", true);