I\'m making a program that uses lots of different compenents, so I\'ve started using a GridBagLayout for it. It\'s working great, but when I run the program I get this:
I simply had to put weightx = 1 within my NoteBox inner class, as suggested by MadProgrammer. This fixed the issue entirely, I'm just writing this to formally mark the answer as solved.