Hi so im having a small problem that i cant figure out and its that everytime i try to run my code im getting an ArrayIndexOutOFBoundsException around lines 60 and 61 and im not sure how to fix this can anyone help me with this?
Hi tony i thank you again for all your help the reason why i changed much of the code was because i noticed that actaully didn't need alot of the code that i had in there and it was probably making me alot more confused because that what i tried to go off of when i was watching videos on youtube to try and learn. i understand now what my problem was and that was the if statement and i needed to use a flag boolean to set the conditions. thank you for all your help i always have the problem with trying to just write a bunch of code and just hope it works without really understanding what im doing... i see now that that is the wrong way to do things
okay so i did a good about of changes now haha i'm having one problem now and i think it might be just a simple error but i'm not to sure where it is or what to do i have been kinda stuck for a while on this now..
i am trying to after i draw the line how do i get to stop drawing lines after that point because right now it just draw lines everywhere after i click.
Hi so i now revised this again and i think im very close but im just messing up somewhere. im not to sure where ,but i can now get the object to follow and i can have it shoot lines ,but when mouse is pressed it shoots lines but once i move the mouse the spot where the mouse is pressed the lines go crazy... please help thank you
okay so this is what i updated now. im having trouble trying to get the oval to follow the mouse movement without the lines going all crazy. i found that when i put repaint into mousepressed i can get the lines and oval to draw at the where the mouse is pressed, but when i repaint in either the mousemoved or in the paint component, the oval repaints but then the lines go crazy and repaint with it. I saw by watching videos about updating the graphics (g) , but that just made everything look like a strobe light haha which is cool that i figured that out but its not what i need. Can someone please help me with this thank you
This is my code for right now and i had a simple question and it was how can i call the method i want which is draw line into the paintComponent or if that is even possible. Im trying to make it so that everytime the mouse is pressed a random line will shoot out at random colors.
Please help thank you
So this is what i got now im trying to figure out now how to get the type to use the chars C and F and im having trouble figuring out how to get the value to cycle through the code
junilu thank you for all your help i see now what you mean by making the code like a conversation because it make it really easy to understand i just get confused because i have to follow specific instructions, but when i read your code it is really easy to see and understand whats going on.
i tried to think about you said and for the sake of not cofusing myself im going to keep it writeOutput since all the test is under that name but i was thinking about if i were to change the name to maybe degreesoutput or degreestype or maybe just keep it and call it dop or dt not sure if that was something your were trying to teach me and i totally ruined it sorry :/ im now trying to figure out how im going to have the code work for both cases whether its F or C im just trying to think of a way for it to work
Sorry about that i was reading the instructions wrong for some reason i thought it said to choose either C or F... my mistake... i have changed it now and this is where i am at now im trying to do the writeoutput
I have been trying to do it in parts i only posted test one without my block comments. I put the double temperatures in the constructors or are they not supposed to be there? i've been kinda stuck for a while changing this and that trying to see what works and what doesn't , but i mean thats part of learning. what im really stumped on is how in the writeout() section how do i make it so it does t1 and then stop to move on to the next section as i posted above i tried to use user input to stop the program but i can seem to figure out how to jump to the different sections