Search:

Type: Posts; User: SOG

Search: Search took 0.08 seconds.

  1. [SOLVED] Re: How do I make a picture-part interact with a user?

    I solved the problem by noting the connection between the paintComponent-method, the paint-method, and the repaint-method. My code for the house and a new class is show below. (The new class was the...
  2. [SOLVED] Re: How do I make a picture-part interact with a user?

    The class I am in is called House.java and it extends JApplet - it's meant to draw the house from my textbook. (I'm not in a school-class for this - it's done by me alone for practice.) So there are...
  3. [SOLVED] Re: How do I make a picture-part interact with a user?

    That is what I tried to do, but I think I'll need a sample of code to figure this out - getting the paintComponent-method to work with the getX- and getY-methods as you pointed out in post number-3.
  4. [SOLVED] Re: How do I make a picture-part interact with a user?

    Here is how the windows/doors are handled in the code, in fact I'll give you the whole paint-method:



    public void paint(Graphics g)
    {
    // Call the superclass...
  5. [SOLVED] Re: How do I make a picture-part interact with a user?

    Just so someone knows, I am trying to paint over the black windows to make them cyan, and paint red over the door. My assignment requires me to use code to paint or draw over the existing-parts, or...
  6. [SOLVED] How do I make a picture-part interact with a user?

    What I am trying to do is draw a house with code relative to getting it's doors and windows closed when I click on them in an applet.

    Here is the house I drew with code,

    2305

    and if you...
Results 1 to 6 of 7