Search:

Type: Posts; User: steel55677

Search: Search took 0.08 seconds.

  1. Replies
    11
    Views
    2,306

    Re: how to use graphics g

    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?
  2. Replies
    11
    Views
    2,306

    Re: how to use graphics g

    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...
  3. Replies
    11
    Views
    2,306

    Re: how to use graphics g

    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{

    }
  4. Replies
    11
    Views
    2,306

    Re: how to use graphics g

    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...
  5. Replies
    11
    Views
    2,306

    Re: how to use graphics g

    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...
  6. Replies
    11
    Views
    2,306

    how to use graphics g

    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...
Results 1 to 6 of 6