Re: Concentric Circles Loosing It
From: Anthony Borla (ajborla_at_bigpond.com)
Date: 12/07/03
- Next message: Larry: "Re: Need help with Session Management and JSPs"
- Previous message: JOe: "Re: newbie: IDE for swing?"
- In reply to: Kanga_Sue: "Concentric Circles Loosing It"
- Next in thread: Alan P: "Re: Concentric Circles Loosing It"
- Reply: Alan P: "Re: Concentric Circles Loosing It"
- Reply: Kanga_Sue: "Re: Concentric Circles Loosing It"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 07 Dec 2003 11:30:13 GMT
"Kanga_Sue" <Kanga_Sue@yahoo.co.uk> wrote in message
news:d78e3e0.0312070028.18983ed7@posting.google.com...
>
> I'm new to Java (distance learning) and struggling with
> a question in my first assignment.
>
Just out of curiosity, is the course an introduction to programming, or an
introduction to Java, one assuming previous programming experience ? If the
former, I'm surprised to know applets and graphics [even basic graphics] are
being taught. I would have thought console-based applications more
appropriate for such a course.
>
> I have to draw 3 concentric circles, prompting the user to input
> a radius. I've managed that, managed to get the 3 circles centered,
> however, when I minimise and maximise the Applet,
> the circles get smaller and smaller.
>
It sounds as if the value of the radius is being decremented each time the
applet is being repainted, something which happens, naturally enough, when
visual aspects of the applet change e.g. minimised, maximised, uncovered
after being obscured by another window.
If so, the remedy is to ensure this value remains fixed after having been
input.
>
> I'm at a lost, been trying to figure it out for about a month
> now. I have one class prompting the user for the radius
> and then passing the values to another class to actually draw
> the circles. I probably haven't phrased this right, but any
> help at this point would be greatly appreciated.
>
If the circles are being correctly drawn initially, then you know the radius
value is being correctly accepted and passed to the 'drawing' class. After
that, though, it is being systematically decremented.
Start inspecting your code :) !
I hope this helps.
Anthony Borla
- Next message: Larry: "Re: Need help with Session Management and JSPs"
- Previous message: JOe: "Re: newbie: IDE for swing?"
- In reply to: Kanga_Sue: "Concentric Circles Loosing It"
- Next in thread: Alan P: "Re: Concentric Circles Loosing It"
- Reply: Alan P: "Re: Concentric Circles Loosing It"
- Reply: Kanga_Sue: "Re: Concentric Circles Loosing It"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|