Re: Relative Positioning of a Point
From: Thomas Weidenfeller (nobody_at_ericsson.invalid)
Date: 03/03/04
- Next message: ms: "Re: Java GUI libraries?"
- Previous message: Sudsy: "Re: Modifying read only files in Java"
- In reply to: B. Clay: "Relative Positioning of a Point"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 03 Mar 2004 08:58:44 +0100
B. Clay wrote:
> I'd like to be able to place a point (g.fillOval) in a relative
> position in a pane, rather than an absolute one. Is there a good way
> to do this?
>
> For example, if the pane is 100x100, and I put the point at 10,10, if
> the user resizes such that the pane ends up as 200x200, I want the
> point to be at 20,20.
See AffineTransform and the long explanation about coordinate spaces in
the API documentation of Graphics or Graphics2D (I forgot which one).
/Thomas
- Next message: ms: "Re: Java GUI libraries?"
- Previous message: Sudsy: "Re: Modifying read only files in Java"
- In reply to: B. Clay: "Relative Positioning of a Point"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|