public TablePanel(Preferences p, Profile prof, StatusBar statBar) {
   pref = p; // Global.getPref();
   profile = prof; // Global.getProfile();
   this.statBar = statBar;
   cacheDB = profile.cacheDB;
   addLast(new MyScrollBarPanel(tc = new myTableControl(this)));
   if (statBar != null) addLast(statBar, CellConstants.DONTSTRETCH, CellConstants.FILL);
   myMod = new myTableModel(tc, getFontMetrics());
   myMod.hasRowHeaders = false;
   myMod.hasColumnHeaders = true;
   tc.setTableModel(myMod);
   if (statBar != null) statBar.setMyTableModel(myMod);
   pref.setMyTableModel(myMod);
 }