Kip Bodey

Ranch Hand
+ Follow
since Sep 28, 2014
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
1
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
23
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kip Bodey

Thank you Campbell... I was just working to get things to work correctly... my entire program is already done, i just made a new little program to work on my saving and opening methods. Thank you all so much!!!
9 years ago
ok, thank you for the provided reading... so i have got it to work but

Also divide your code. You should have a method for writing and one for reading. In fact, every method should do one thing and one thing only.



i have a save method which writes my arrays to a file, i have an open method which opens the file, and then i have a read method which iterates through it and rewrites it to an array. What here is not divided like it should be?
im reading the oracle documentation i realized i needed to change the delimiter to find things other than white spaces. however i am again a little stuck. i mean i guess i could use this but it isn't exactly the same as my teacher suggests.

this is the code i used to set the delimiter, so if it reads the line, howzzarezzyouzz, it produces, how are you... i think the \\s* \\s* means something about white space... but even with no white space in my entered string it appears i need those im curious as to why.
So what does \\s* \\s* mean?
9 years ago
so i am saving a file. it is an array of two strings each containing three words. i figured out how to save to a text file and read it back in and put it back into an array. i am using scanner.hasnext and scanner.next and i think that separates the strings into variables using the spaces in the strings. well for my project i need to do it with a symbol instead of a space


i put some comments in the read method so you can get exactly what im trying to accomplish, Thank you!!!
9 years ago
Thank you... you're the man i didn't even think about that
9 years ago
so for a test i have a small array set as a jlist which is the contents of my jscrollpane, and it appears as if nothing is there until i adjust the window size by dragging it out or in... whats going on?
here is the full code
9 years ago
Thanks i finally found something on youtube to help me out... i think its a jlist but added to a jscroll pane? well it seems to at least have the functionality i need so i think i will try to use it. thank you
9 years ago
here is a picture of what i am trying to figure out sir
9 years ago
im not sure if your being a smart ass or i really didnt explain myself well enough... lol ok her program, which is what the video is of, consists of a program that does what i need to do. i am trying to figure out what the thing that displays her list is... like is it a JScrollPane, or what. again im speaking about the componenet that holds the list in her program in her video... also curious about what is used at the bottom, is it some sort of menu bar or something?
9 years ago
so i have to make a program that will display an array list(which is a list of my library inventory), with buttons on the bottom, to add, checkout, return, and delete. when you run this program it should show the list in the middle of the screen in some box... im having trouble figuring out what this "box" is? here is a link to my teachers example, i hope you can see it. webpage
but if you cant it basically displays them all, and they are clickable, for instance i can click it and select delete. what component is this?
9 years ago
i put in an event handler for the plus button twice, thats what was causing the issue. but thanks for the help, and for the advice on how to ask for help in the future!!
9 years ago
it stands for short, so i made short code for just the plus sign and three numbers and it works, which again will not solve my problem, there id something small in my entire code that is wrong i think and i cant find it here is the code for it to work

9 years ago
yes i did, i can trim it to where the error occurs, but im just as concerned with why it isnt happening for the other operand buttons, they have the exact same code copied and pasted

now only one throws an error, but they do the exact same thing?
9 years ago
Well there are two other parts thats why it wouldnt run, here is the rest of the code


9 years ago
Yeah it does
9 years ago
it prints the value that was in the box, then throws the error? here ill show you my new code, everything works, but that, i mean it still works, it just throws error

9 years ago