diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/EpnTapMainApp.java b/src/main/java/eu/omp/irap/vespa/epntapclient/EpnTapMainApp.java index e480ab3..39059bf 100644 --- a/src/main/java/eu/omp/irap/vespa/epntapclient/EpnTapMainApp.java +++ b/src/main/java/eu/omp/irap/vespa/epntapclient/EpnTapMainApp.java @@ -24,7 +24,6 @@ import javax.swing.SwingUtilities; import com.google.gson.Gson; import eu.omp.irap.vespa.epntapclient.gui.mainpanel.MainPanelCtrl; -import eu.omp.irap.vespa.epntapclient.gui.mainpanel.MainPanelView; /** * Simple class to have a main function to launch the EPNTap client. @@ -56,26 +55,25 @@ public class EpnTapMainApp { return; } - MainPanelCtrl guiCtrl = new MainPanelCtrl(); - guiCtrl.readServices(); - SwingUtilities.invokeLater(EpnTapMainApp.run(guiCtrl.getView(), "EPN-TAP client")); + SwingUtilities.invokeLater(EpnTapMainApp.run("EPN-TAP client")); } /** * Creates runnable used to run the application GUI. * - * @param voTableView The VOTable main view, created by the controller. * @param title The title of the application window. * @return The runnable. */ - private static Runnable run(final MainPanelView voTableView, final String title) { + private static Runnable run(final String title) { return new Runnable() { @Override public void run() { + MainPanelCtrl guiCtrl = new MainPanelCtrl(); + guiCtrl.readServices(); JFrame frame = new JFrame(title); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - frame.setContentPane(voTableView); + frame.setContentPane(guiCtrl.getView()); frame.setVisible(true); frame.pack(); frame.setLocationRelativeTo(null); -- libgit2 0.21.2