thanks, i've gotten it to work correctly now.
i got one last question, is there a way to store rectangle/oval or any shape so that when i make an eraser button, i can remove it?
Type: Posts; User: steel55677
thanks, i've gotten it to work correctly now.
i got one last question, is there a way to store rectangle/oval or any shape so that when i make an eraser button, i can remove it?
Thanks, now I've changed it to:
public class PaintHere extends Canvas{
}
I'm hoping canvas would work because on the description it says: "A Canvas component represents a...
got it, my first step. I added it as an inner class, is that okay? or do i need to make it outside of my etch a sketch class?
public class paint extends JPanel{
}
Yeah =\. I wished I did mine out of scratch but we're suppose to use our prof's pre-made program and then do the modifications there. I made a quick tester just like that and it worked when I used...
I see. I added repaint(); after mouseReleased and whenever I tried to draw a rectangle, it still won't show up :(. I'm really confused on how it is able to draw on the GUI when it's at mouseDragged...
when i make a
public void paint(Graphics g){} in this program, it wouldn't do anything. But when I put it at the method mouseDrag, it would draw. But it doesn't work if I want to make rectanges...