how can i run this program when clicking the button in java?
<pre><code>import javax.swing.*;

public class Client extends JPanel {

    public static void main( String[] args) {

        clients application;

        if (args.length == 0)
            application = new clients("");
        else
            application = new clients(args[0]);
            application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE );

    }
}
</code></pre>

<p>I have a java program which consists of swing buttons,When i click on a button i need this program to be executed.How to do?i have tried all possible cases.</p>
