Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6947265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:40:18+00:00 2026-05-27T13:40:18+00:00

A Java applet has the following in its start() method : this.setFocusable(true); this.requestFocus(); When

  • 0

A Java applet has the following in its start() method :

this.setFocusable(true);
this.requestFocus();

When launched, the applet grabs the focus only in certain OS/JRE/browser configurations. It’s compiled using JDK 1.6.0_18, and on my PC running Java 1.7 it grabs focus in all browsers (Ie, chrome, Firefox) without problems; even if the applet is compiled using JDK 1.7.

On Mac OS X 10.6.8 which comes with Java 1.6.0_29 it doesn’t grab focus in Safari, Chrome or Firefox, but the applet loads fine. When I upgrade the the Mac OSX JDK to the preview 1.7 – it doesnt’ load the applet at all. If I compile the applet using JDK 1.7 and run using JRE 1.7 – it just crashes the browsers on the Mac.

Has anyone come across similar problems? thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:40:19+00:00Added an answer on May 27, 2026 at 1:40 pm

    The docs. for Component.requestFocus() state:

    Because the focus behavior of this method is platform-dependent, developers are strongly encouraged to use requestFocusInWindow when possible.

    Is it possible to use the latter in this case?

    Has anyone come across similar problems?

    Focus problems go hand-in-hand with embedded applets. If you want more reliable focus behavior, launch the applet free-floating using Java Web Start.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a Java Applet built using AWT. This applet lets you select pictures
I have a Java applet that is meant to run only on Windows. (It
I have a rather large legacy Java Applet that has several problems: It looks
I'm using a framework called Processing which is basically a Java applet. It has
Ok so I'm not Java expert but I'm just programming this java applet game
I'm working on a runnable java applet that has a fill feature much like
I use Java Applet like an example. When you open a website which has
For a Facebook iframe app, we load a file browser Java applet. This works
I have a java applet what has embeeded h2 database, and table with 200.000
This may be old error but I am stuck here. I created Java applet

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.