Win a copy of Rust Web Development this week in the Other Languages forum!

jack pashley

Greenhorn
+ Follow
since Nov 21, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by jack pashley

Okay it's time for me to go full noob. I have absolutely no idea how to pass an into between to methods. All i want to do is pass a from the passing class to flag in the main class. This is the code i got made


the outcome is
Passing Flag = 555
a = 0
Main Flag = 0

i want the outcome to be
Passing Flag = 555
a = 555
Main Flag = 555

if any one can shed some light i will be grateful.
8 years ago
No it did not work

8 years ago
I have a zombie apocalypse simulator that I've been making. I'm having problems with making the text come up slow enough in my JTextArea (resultField) so that you can see it. All the program has to do is hold a loop still four about a second to half a second so you can read the variables as it increments. I have tried using Thread.sleep(500); but that just makes the GUI freeze for 500 seconds. So what i need the most is someone to help me set up a timer because I've looked all over the internet and none of the tutorials work for what I need (some of them didn't even work at all)

Loop where the code needs to go

8 years ago
I am trying to make an organizer for myself and my friends at school. At the moment i have become stuck at this part. What I want it to do is add a new line of text when i click a button, this works but when i close the program, change what it enters and run it again it will still just erase the lines if codes in the .txt file and just put in that new line.

For example I want it to go
END OF FIRST LESSON
Homework:cibfsibfibfsfiufsfhi
END OF SECOND LESSON
Homework:ebfisfiuhefsiuhefiushif

But what it is doing is just erasing the lines of text and adding the second line of code pleas help.

this is my code
9 years ago