title: How to set automatic focus to Java applet on js
body: <p>I made an applet. It's starting when web page is loaded. But applet lost focus, when web page lost focus too and need to click on area of applet and then it gained focus.
  I'm tried variants but it's not helpful</p>
  
  <pre><code>document.getElementById(appletId).focus();
  document.getElementById(appletId).requestFocus();
  </code></pre>
  
  <p>How to set focus to applet in java script?</p>