/* this is the MainFrame class, notice how "this" is passed to the new controller */ public class MainFrame extends JFrame { public MenuBarView menuBar; public JFileChooser fileChooser = new JFileChooser(); public MainFrame() { super(); setTitle("Card Suite"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); MenuBarController menuBarController = new MenuBarController(this); /* this is the controller, and it fails to compile, saying frame.fileChooser does not exist */ public class MenuBarController { private JFrame frame; public MenuBarModel model = new MenuBarModel(); public MenuBarView view = new MenuBarView(model); public MenuBarController(JFrame frame) { System.out.println(frame.fileChooser);