title: How to create new instance dynamically in GWT?
body: <p>I have a case, generate an instance  dynamically ie, 
  i have map like </p>
  
  <pre><code>Map&lt;String,Class&gt; classMap=new HashMap&lt;String,Class&gt;();
  classMap.put("key1",Panel.Class);
  classMap.put("key2",Panel1.Class);
  classMap.put("key3",Panel2.Class);
  Class clazz=map.get("key");
  GWT.create(clazz);
  </code></pre>
  
  <p>when i compile using  <code>GWT Compile</code>  i got the exception</p>
  
  <pre><code>Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
     [ERROR] Errors in 'com/asklepian/web/Sample/sample.java'
        [ERROR] Line 19: Only class literals may be used as arguments to GWT.create()
  </code></pre>
  
  <p>is there is any better way to achieve the same.Thanks in advance</p>