You can see the little arrow thing on the top..I don't know why it's there, and what its' purpose is.
Solution: I don't know. It hasn't been solved yet. Gotta find out how to use it.Problem: Just inserted the code to add the JTextAreas and JTextFields so that the user can enter all the information, and for some reason, it looks like this:
Solution: I found my (big) boo boo. I realized that the addCentreField and the addEastField arrays were switched, when they were supposed to be JTextAreas and JTextFields and they weren't.
Problem: I created the table and everything, but it wouldn't show up and it was an empty frame like this:
Solution: I created a tertiary constructor so that it would run the gooey method when needed. I found out that my error was that the program could not reach the showGooey method from the original class because they both had to be static, so I just wrote a constructor that accepted a String, and called the gooey method from there. Now, it looks like this:
Problem: As you can see per above, it shows 50 items even though they are empty, which I don't want - at all.
Solution: Only make the array as big as the position in the array. When the time comes to add an entry or delete an entry, just increase position in array, and add an element to the array using the 3-way switch.
Problem: Every time I added a new entry and sent it to the other class, it would crash with an ArrayOutOfBoundsException: 20.
Solution: In the for loop, it should have stopped at the shortest array (TableArray) rather than the temporary array that I created to store the things.
Problem: Using JOptionPanes, every time the user presses 'cancel', it returns a value of -1. So when you go to access it, it calls a NullPointerException (Even if it is inside an if statement).
Solution: Initialize it as "" or have an if statement that says if it is null, make it "".
Problem: Position In Array value is supposed to increase or decrease if you are adding or removing, respectively, the certain elements. However, when I was removing them, it didn't decrement (even though I had the code for it.
Solution: After debugging, I realized that I decreased the value too early, when I hadn't even checked if the user was going to do something, so when it got to the adding part, the increment only incremented it back to what it was before (and what it was supposed to be).
Problem: The JTable wasn't showing up, and if it did, only one or two entries of it showed up.
Solution: I accidentally had it pointing to a second text file that only had 2 entries, which is rather confusing because i don't remember when I made that.
Problem: When I pressed Clear Texts for the add entry one, only the JTextFields would clear - not the JTextArea
Solution: Clear the JTextArea in the same if statement mouseListener.





No comments:
Post a Comment