Search:

Type: Posts; User: AvivC

Search: Search took 0.10 seconds.

  1. Re: How to draw a rectangle on a JPanel, from a different class?

    It works, thanks :) But I don't understand why what I did before didn't work.

    You said I needed a reference to the Graphics object of Surface. But I did obtain one inside DrawRect class, in the...
  2. How to draw a rectangle on a JPanel, from a different class?

    Hello everyone, now to this forum :)

    I'm fairly new to 2D graphics in Java.
    I learned how to draw simple shapes on a JPanel, using the paintComponent method.

    Now I'm trying to do the same...
Results 1 to 2 of 2