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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:09:20+00:00 2026-06-10T10:09:20+00:00

Today i needed to visualize a large data set on screen by using doubles

  • 0

Today i needed to visualize a large data set on screen by using doubles or floats to position elements. When using pixels i can simply draw a rectangle with the following code:

gimg.draw(new Rectangle2D.Double(1, 1, 50, 50));

But when i try drawing two rectangles with the following code a problem appears.

gimg.setColor(Color.white);
gimg.draw(new Rectangle2D.Double(1.0, 1.0, 50, 50));
gimg.setColor(Color.gray);
gimg.draw(new Rectangle2D.Double(1.1, 1.1, 50.1, 50.1));

The 2 rectangles are drawn over each other, in other words, you can’t see a white and a gray rectangle because the gray one is drawn over the white one.

I’m using a 0.1 increment. After a bit of testing i seem to be able to view partial rectangles when using a 0.5 increment. The problem here is only i also need to make rectangles visible which only differ 0.01 in position.

I suspect i’m missing something really important here. Can anybody offer me a helping hand?

  • 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-10T10:09:22+00:00Added an answer on June 10, 2026 at 10:09 am

    You should consider using a 0.1 : 1 scale instead, because pixels can’t be divided into tenths (or any fraction for that matter) without losing accuracy / presentability. Imagine the tiny pixels on your screen – you’re trying to divide a 1px line into 10 distinguishable sections. That’s not possible, unfortunately.

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

Sidebar

Related Questions

I am using OSX local web server and today I needed to set up
Today I needed to parse some data out from an xlsx file (Office open
I was put in a position today in which I needed to enumerate all
I needed a utililty function earlier today to strip some data out of a
Never heard of computed column until I needed to set one up today so
I've just today learned of asp.net mvc, and I'm wondering what is needed from
I came across something very basic but extremely bewildering today. I needed to convert
I had java jdk 1.6 installed, and today installed jdk 1.7 becaused needed to
Today I generated a webservice client with CXF 2.6.1 (latest version), using the tool
Today I came across a situation where I needed to decide if an entire

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.