title: When I'm running jar as a service with the help of nssm the JOptionPane.showOptionDialog() is not showing up
body: <p>My program has the piece of code which pop-up the window dialogue box notifying the user about the ongoing process for this I'm using <strong>JOptionPane.showOptionDialog()</strong></p>
  
  <p>But when I'm starting the program as a service instead of running a jar file, I'm not able to see the pop-up window</p>
  
  <p>I'm using <strong>nssm</strong> to create the service from jar/bat file </p>
  
  <p>The following code is responsible to show the pop-up window</p>
  
  <pre><code>private void showWindow(String msg) {
  
          JTextArea textArea = new JTextArea(msg);
          textArea.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 18));
          textArea.setLineWrap(true);
          textArea.setWrapStyleWord(true);
          textArea.setOpaque(false);
          textArea.setEditable(false);
          textArea.setSize(new Dimension(400, 10));
  
          JOptionPane.showOptionDialog(null, textArea,
                  "Application",
                  JOptionPane.DEFAULT_OPTION,
                  JOptionPane.INFORMATION_MESSAGE,
                  null, null, null);
  
      }
  
  </code></pre>
  
  <p>I want to understand, Does service allow the program to show a window like this on a foreground?</p>