How to throw an exception when a rectangle goes out of the boundaries of a JFrame. The program is asking to draw a triangle, and resize it. If the triagle size goes out of the JFrame throw an execption.
I got the triangle and resizing done. MY QUESTION IS HOW CAN THROW AN EXCEPTION WHEN THE GRAPH GOES OUT OF BOUNDARIES!