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

  • Home
  • SEARCH
  • 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 8396269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:29:40+00:00 2026-06-09T20:29:40+00:00

Im making a swing desktop application. It draws layered vector graphics and the interface

  • 0

Im making a swing desktop application. It draws layered vector graphics and the interface uses a scrollbar and has the ability to zoom in. There are about 5 layers of vector graphics and one layer in particualy is very expensive to draw. The layers may require to be repainted from time to time (simple animation).

The situation right now is as follows:

  1. A buffered image is created
  2. Every layers gets drawn on the image
  3. the buffered image is displayed on the screen using a panel that has the same size so that a scrollbar can be used.

Im running into performance issues when i zoom in. The zooming can make the buffered image really big. An image can peak at 60000×60 when the scale is at 16x. Offcourse this takes up a lot of memmory and i want to redesign this.

I really dont know where to start though, i feel like im reinventing the wheel. My knowledge of java2d is also very limited. I really want to improve this by maybe using a library, i know there must be something that has the functionality i want. Any libraries that come to mind?

  • 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-06-09T20:29:42+00:00Added an answer on June 9, 2026 at 8:29 pm

    Don’t create the buffered image. You are rasterizing the output before you know how much of it is to be displayed.

    Look into “damage” rectangles, and have a callback system which tells you the “sub portion” of the raster it needs to present, then only rasterize the required pixels. That should give you relatively consistent performance no matter what zoom level, because the only pixels to be computed are the pixels to be displayed, not an image which has conceptually 16^2 times more pixels than it did before.

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

Sidebar

Related Questions

I m making Desktop Application in netbeans plpatform in java swing.when i run my
I'm making a swing based application where I have a JList that periodically get's
I am writing a Desktop GUI application in Clojure using Java Swing. Normally when
I am planning on making a Java Swing application and was wondering if Swing
Hey guys I am making a terminal application using Swing and Apache Commons. I
Hello sir/mem i m making Desktop App in java Swing for doctor.I want to
I'm making a simple Kakuro application in Java Swing and I have used JButton
I am making an application with Java Swing and i have a problem. I
In my Swing application, I want the ability to switch between decorated and undecorated
We are making an emulator for disabled persons. There is a desktop area in

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.