So I'm trying to make a very simple text-based solitaire game with gui, but the display won't work quite well.
The
cards are supposed to be displayed in a certain text area after clicking the a button. However, after clicking the button twice, it doesn't overwrite the old contents in the text area.
Could anyone tell me what's wrong with my code? I'm fairly new to
Java and in this forum so do feel free to critic my code, and try to bear with my terrible coding. Thanks!
Note: This is a shortened version of my code, highlighting the issue alone. Also, I'm not allowed to use LinkedList provided by the JRE, hence I'm manually making my own linked list.
My main class:
My piles class:
Here's an image (and link) of the result:
img
Any help would be greatly appreciated!