JAVA Coding Question

I’m trying to write and app that will display a point in the same RELATIVE position at all times. I know I can use the g.fillOval object to draw one at the same absolute position, but is there a way to make it so it will stay at the same absolute position?

For example, let’s say my window is 100x100. I want the dot to be at 10,10 to start. If the user resizes the window to 200x200, I want the dot to be at 20,20.

Any help is appreciated.

The position of the dot is a variable dependent on the width and length of the window. Do your own homework.

Do my own homework? Wow… that was pretty harsh. No, I’m afraid this isn’t for school. I work in the IC industry and we manufacture computer chips. As part of the manufacturing process we scan the dice for defects. The position of those defects is given as an x,y coordinate within the die.

I’m trying to write a java application which will present the user with a wafer map full of dice, each die color coded based on:
pass/fail electrically
defect/no defect found

If the user clicks on a particular die, I’d like a secondary window to show the exact location of where the defect was located within the die.

The first few parts are very straightforward to me. Adding actionListener to the buttons representing the dice on a wafer to call up the Die object is simple, obviously. What isn’t obvious to me is how to represent the location of the defect as the frame containing the Die object resized and moved. I know I can call something like getWidth() and getHeight() (I don’t know the exact name of the method… and I hadn’t been able to look it up as java.sun has been down) and then use this information to recalculate the placement of the dot, but then when does the dot get redrawn?