Re: Set keyboard focus to Applet when it is loaded




"Felix Natter" <fnatter@xxxxxxx> wrote in message news:87ejv5z25m.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxx
hi,

I have an applet with a JTextArea and I would like the keyboard focus
to be in that JTextArea as soon as the applet is loaded (so that
the user can immediately start typing).



textarea.requestFocusInWindow()
1) put this in start(), or
2) add it to a timer, setRepeats(false), 150ms should do





.



Relevant Pages

  • Set keyboard focus to Applet when it is loaded
    ... I have an applet with a JTextArea and I would like the keyboard focus ... Felix Natter ...
    (comp.lang.java.gui)
  • JScrollPane in an applet
    ... an applet vs. an application? ... JScrollPane and it doesn't seem to show the scroll bar no matter what. ... I've tried setting the scroll bar policy, resizing the applet within the ... HTML, resizing the JScrollPane, resizing the JTextArea, resizing browser ...
    (comp.lang.java.programmer)
  • Re: Set keyboard focus to Applet when it is loaded
    ... I have an applet with a JTextArea and I would like the keyboard focus to ... Felix Natter ...
    (comp.lang.java.gui)
  • Re: Applet + Swing basic (very basic!)
    ... >simple lines of text as the applet runs. ... >need to be able to write to the JTextArea. ... I assume you're creating instances of your "custom classes" inside the applet ... Lee Weiner ...
    (comp.lang.java.gui)
  • Re: No keyboard into in JTextArea in JApplet
    ... keyboard input. ... JInternalFrame in an applet. ... Even selecting text inside of the JTextArea with the ...
    (comp.lang.java.gui)