Hey there guys, I want to make a program that will track the number of times I have clicked a button.
Thing is, I want this to write the information down and load it every time, so it doesn't start at 0 every time you start the program.
How would I go on about writing the info and then reading it and converting it into an int object?
I am pretty much lost here :S
Jump to Post
Create a JFrame, and a button. Button code should increase an integer variable by one. When the program loads, read the first line of a txt file and set the variable equal to the integer value of that. Do some error checking on that. Use a BufferedReader to read the …
All 4 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.