/**
   * Method for creating and showing the user interface.
   *
   * @param config the instance to be created and shown
   */
  public void createAndShowGUI(Config config) {

    this.frame = new JFrame(lang.getText("ui.mainview.windowTitle"));
    this.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    this.frame.setPreferredSize(
        new Dimension(
            Integer.valueOf(config.getProp("windowWidth")),
            Integer.valueOf(config.getProp("windowHeight"))));
    this.frame.setLocation(
        Integer.valueOf(config.getProp("windowXPos")),
        Integer.valueOf(config.getProp("windowYPos")));

    addComponentsToPane(this.frame.getContentPane());
    addMenuBar(this.frame);

    // support for ubuntu global menu, using the jayanta-lib
    ApplicationMenu.tryInstall(this.frame);

    this.frame.pack();
    this.frame.setVisible(true);

    // we add the controller as a listener to observe changes
    this.frame.addComponentListener(this.controller);
    controller.setTable(table);
  }
 public static void showNow() {
   if (ourInstance == null) {
     IdeFrame frame =
         EP.getExtensions().length == 0 ? new WelcomeFrame() : EP.getExtensions()[0].createFrame();
     if (SystemInfo.isLinux) {
       ApplicationMenu.tryInstall(((JFrame) frame));
     }
     ((JFrame) frame).setVisible(true);
     ourInstance = frame;
   }
 }