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 6782477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:44:48+00:00 2026-05-26T16:44:48+00:00

One of my recent Java assignments (High school course…) is to make an applet

  • 0

One of my recent Java assignments (High school course…) is to make an applet where a border is drawn and a ball moves around the screen bouncing on the borders. I have Fraps installed and it reports that the applet is only running at a mere 10 fps, which makes the animation look extremely mediocre.

My original way of drawing the animation:

  1. call my method: drawScreen() in paint()
  2. have a Thread.sleep(1000/frameRate) pause in drawScreen() for the frame rate, which is passed from the html
  3. call repaint()

This worked wonderfully well and the applet ran like a dream… Until I saw the grading sheet, where it said that I must not redraw the screen each time (Maybe it’s because the computers are unusually slow and my friends have been complaining that their applets flicker enough to cause eye discomfort, and a lot of tearing all over the place), and I have to draw a ball, then draw another ball the same colour of the background to cover it up, calculate the coordinates, and repeat until the applet quits

The problem with this is that

  • repaint() can’t be called
  • my animation is capped at 10 fps
  • there’s no threads available to respond to me clicking close on the appletviewer, or anything else in the applet/viewer.

Is there a way for my animation to run above 10 fps without using repaint()?

  • 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-26T16:44:49+00:00Added an answer on May 26, 2026 at 4:44 pm

    Turns out I needed to either implement double buffering or run the applet in a double buffered browser. AppletViewer limited the animation to 10 fps ’cause it doesn’t automatically buffer the applets and I was running the applet inside it all this time.

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

Sidebar

Related Questions

Using a technique I found in one of the recent ASP.NET MVC books, I
In a recent project, I built my own MVC framework in PHP. One of
I have a table of recent web guest who have registered. One of the
I have a 2 entities in a One-To-Many relationship: OfficeView.java: public class OfficeView implements
I am of course familiar with the java.net.URLEncoder and java.net.URLDecoder classes. However, I only
Being a long-time Java programmer and in recent years a Haskell addict, I am
At a recent event a developer working for one of the top US mobile
I was faced this question while one of recent interview : class1 { virtual
One of those classic programming interview questions... You are given two marbles, and told
One of my biggest typographical frustrations about HTML is the way that it mangles

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.