Guys i need help on the java graphics coding....basically this is my painter code....
Basically all i want is a rectangle that is red color with a stroke color (border) of black. But my question is how to set color for the stroke? i tried drawing the square then after that setPaint to black & draw again but dosent work that way either....been trying so many other ways & google-ing but couldnt find any result...
posted 3 years ago
possibly create 2 rectangles
1) draw() - which will give you the black border
2) fill() - this is red and will be the inside, so the x,y,w,h will need to be adjusted for 'strokeValue'
don't know what you're doing, but might be a lot easier using a component