title: how to set a colour passed as an argument from an html file to a rectangle in an java applet program
body: <p>A java applet to display a rectangle with specified coordinate and colour passed as parameter from the HTML file.
  I'm able retrieve and set the coordinate's of the rectangle passed as parameters from an html file but i'm unable to set the colour passed as parameter from an html file,how to do this? I have tried this code,but its not working properly.</p>
  <pre><code>import java.awt.*;
  import java.applet.*;
  /* &lt;applet code=&quot;ParaRect&quot; width=1200 height=1000&gt;
  &lt;param name=x value=100&gt;
  &lt;param name=y value=200&gt;
  &lt;param name=color value=&quot;red&quot;&gt;
  &lt;/applet&gt; */
  public class ParaRect extends Applet{
      public void paint(Graphics g){ 
         String x=getParameter(&quot;color&quot;);
         g.setColor(Color.x);
         g.fillRect(Integer.parseInt(getParameter(&quot;x&quot;)),Integer.parseInt(getParameter(&quot;y&quot;)),150,100);
      }
  }
  </code></pre>