Okay I've asked some questions before but this is a little more complex:
I have a little side project that I'm doing for fun called MultiFunction that's basically a prime number checker (that also lists factors) and a Pythagorean Theorem calculator. It's pretty nifty and I've spent time making it more efficient and easier to use like listing factors of a prime number and telling you if it's a Pythagorean Triple or not. Simple stuff but still the most complex thing I've ever done. Now I want to go one step further but unfortunately it's just a step beyond my knowledge. I'd like to be able to draw the triangle the Pythagorean Theorem method is describing. I can work out the triangle bits later (I have the Expo class to help me out with graphics and such) but I'm having issues with getting the two to play nice with each other in the first place. I understand you can't have a paint method and a main method in the same program or at least I can't get it to work so I'm wondering how I would output all my triangle drawing programming into a separate file and have it be able to pull values from the MultiFunction file and then return the triangle to be output in an applet. I'd appreciate some help and I'll provide any more details necessary if you need more information.
I have a little side project that I'm doing for fun called MultiFunction that's basically a prime number checker (that also lists factors) and a Pythagorean Theorem calculator. It's pretty nifty and I've spent time making it more efficient and easier to use like listing factors of a prime number and telling you if it's a Pythagorean Triple or not. Simple stuff but still the most complex thing I've ever done. Now I want to go one step further but unfortunately it's just a step beyond my knowledge. I'd like to be able to draw the triangle the Pythagorean Theorem method is describing. I can work out the triangle bits later (I have the Expo class to help me out with graphics and such) but I'm having issues with getting the two to play nice with each other in the first place. I understand you can't have a paint method and a main method in the same program or at least I can't get it to work so I'm wondering how I would output all my triangle drawing programming into a separate file and have it be able to pull values from the MultiFunction file and then return the triangle to be output in an applet. I'd appreciate some help and I'll provide any more details necessary if you need more information.