473,399 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

GetCoordinates

blue angel
hi...

i'm having a problem wiht java, please help me :-)

if i have a rectangle and i can specify the coordinates of all the corner points. then i would like to devide the rectangle into smaller rectangle for example as many as i in the x direction and j in y direction. How can i make the syntax so the java could count the coordinates of all other points??

thanks in advance
Jun 19 '07 #1
3 2223
blazedaces
284 100+
hi...

i'm having a problem wiht java, please help me :-)

if i have a rectangle and i can specify the coordinates of all the corner points. then i would like to devide the rectangle into smaller rectangle for example as many as i in the x direction and j in y direction. How can i make the syntax so the java could count the coordinates of all other points??

thanks in advance
I don't understand what you want... you say that you're specifying the coordinates of the corners. Doesn't that mean you don't need java to count them again for you? Either way, once you made the rectangle/drawn it, java stores it as an object, and that object would have stored the corner points as well as heights and widths.

You can then just draw a bunch of other rectangles, what is the problem again?

Sorry, just elaborate further on the specific issue...

-blazed
Jun 19 '07 #2
I don't understand what you want... you say that you're specifying the coordinates of the corners. Doesn't that mean you don't need java to count them again for you? Either way, once you made the rectangle/drawn it, java stores it as an object, and that object would have stored the corner points as well as heights and widths.

You can then just draw a bunch of other rectangles, what is the problem again?

Sorry, just elaborate further on the specific issue...

-blazed
sorry if i can't explain it clearly.
what i mean is :
before what i have is a plan rectangle with 4 points on each corner
then i the rectangle is devide into small rectangle like in a chess board, so now the rectangle have a lot of point/nodes (inner point and outer point).
i want the java to give the coordinates of other points
Jun 19 '07 #3
JosAH
11,448 Expert 8TB
sorry if i can't explain it clearly.
what i mean is :
before what i have is a plan rectangle with 4 points on each corner
then i the rectangle is devide into small rectangle like in a chess board, so now the rectangle have a lot of point/nodes (inner point and outer point).
i want the java to give the coordinates of other points
If the size of your outer rectangle measures WxH (Width times Height) then your
smaller rectangles measure W/i x H/j each. They're all adjacent so their corner
points are equal pair-wise speaking. The rest is a simple exercise I leave to you.

kind regards,

Jos
Jun 19 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Danny | last post by:
How can I get the coordinates of the mouse cursor in Mozilla browsers as well as Opera and IE6? I'm struggling to understand how to capture mouse movement events with Mozilla/Netscape/Firefox and...
3
by: Dean Craig | last post by:
I'm working with the new ASP.NET AJAX Control Toolkit. I have a map that has several key areas (hot spots) where when the user hovers over them, I want to pop up a small window with information in...
16
by: drwyness | last post by:
Hello, Please help with the following problem it is causing me some headaches. The following javascript code is designed to fill in text boxes with numbers on an online game (tribalwars). It...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.