Recommand · January 13, 2022 0

Trying to get a continuously growing ArrayList in a JLabel so that the list does not run out of my JFrame

I’ve supposed created a math game whereby the last JFrame called is the results/analysis frame and within my JLabel statemenet, I included an arraylist that continuously grows the more i play.
E.g. the circled value will keep increasing
the values that increases will be stored in an arraylist. However when I play it >40 times, the arraylist runs out of the screen. Is there anyway to wrap it nicely? I’ve tried HTML tags and tried JTextArea but it shows up very weirdly.

arraylist runs out of the screen

what i’m trying to aim for is this
my goal