Does any1 know how to draw a circle inside a rectangle.The circle should be a different colour from the rectangle. Also, the word ‘Welcome’ should be neatly inside the circle. Thanks for any help in advance.
@agent_x91May 18.2006 — #[code=php] g.setColor(Color.RED); //replace with any colour you want g.fillOval(x,y,w,h); //replace with dimensions for circle g.setColor(Color.WHITE); //writing will be in this colour g.drawString("Welcome",x,y); //replace with dimensions [/code]
If the drawString parameters are in the wrong order, sorry I haven't use drawString in a while. it's either String,int,int or int,int,String anyway.