my controller class looks like this:
public class MainController {
private MainFrame mainFrame;
public MainController(MainFrame view){
mainFrame = view;
mainFrame.addStandingsListener(new StandingListener());
}
private class StandingListener implements ActionListener{
public void actionPerformed(ActionEvent e){
StandingFrame sf = StandingFrame.getInstance();
TeamDB tdb = TeamDB.getInstance();
mainFrame.setLabel(tdb.getLabelContent);
}
}
}
now this won't compile because of my actionlistener
the object of tdb that I use throws an SQLException which I need to catch
the only thing that java lets me do is to put a try catch block around it, that would mean I interact with the user in my controller class, which I don't think is proper programming
does anyone have a solution for this problem?
in it I want


Sign In
Create Account


Back to top









