Java Questions

Zachary Boddy

Staff member
Aug 3, 2014
2,389
13
38
www.windowscentral.com
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.
 

wpbestplayer

New member
Dec 21, 2013
53
0
0
Visit site
Your first program output will be the input to another function that you will call from the applet. When you take the values you will use repaint() method.
 

Members online

Forum statistics

Threads
323,308
Messages
2,243,613
Members
428,056
Latest member
Carnes