title: Automating a JNLP Application using Java Agents
body: <p>I'm trying to automate some operations in a jnlp application using a Java Agent that gets into the "VM instance of the app" and then create a new instance of my Swing GUI(and my class for automation).</p>
  
  <p>It works fine, I can access the components of the Frames. The problem is that my GUI runs as an "applet" which gives me a yellow annoying triangle at the corner of my GUI and also cut off my permissions(like file accessing).</p>
  
  <p>The JNLP has the <code>&lt;application-desc main-class="x"/&gt;</code> setting in the JNLP file so the app doesn't run as an applet.</p>
  
  <p>How can I run my Swing GUI as an application and not an applet?</p>
  
  <p>Code of the JavaAgent</p>
  
  <pre><code>public class FrameSearcherAgent {
  
     public static void agentmain(String args) {   
  
     Frame[] frames = Frame.getFrames();        
     for(Frame f: frames)
     {          
        if(f.getTitle().equals("Frame Title")){
           //Parameter is the Frame I want
           new JFrameAutomateGUI(f).setVisible(true);
           break;
        }
      } 
    }
  }
  </code></pre>