private void newTab(final String panelName, int panelId) {
Component panel = null;
switch(panelId) {
case ViewHelper.LIST_EVENT:
panel = new ListPanel(new EventsController(), new Event(), this);
break;
case ViewHelper.LIST_STAFF:
panel = new ListPanel(new StaffsController(), new Staff(), this);
break;
case ViewHelper.LIST_CLIENT:
panel = new ListPanel(new ClientsController(), new Client(), this);
break;
default:
ViewHelper.showDialog("I don't know that panel");
}
mainTabbedPane.add(panel);