Thanks everyone. I have tried some profilers and now I'm REALLY confused! I've tried JConsole and NetBeans. I'm a bit overwhelmed with the info from NetBeans, but it seems there are a lot of int[] from BufferedImage. My program is a sort of flower hybidising thing. I have a singleton class called FlowerSimState which holds all the information, and the panels of the gui are registered as observers. What's really confusing me is that if I press the button with the OffspringListener repeatedly (50 times), the memory usage constantly increases untill it dies. If I press the RandomListener button the memory fluctuates, but it calls the same function as the OffspringListener! If I press other buttons, the OffspringListener still kills the program but at a less predicatable rate.
I've included some code, but it's not all there as I tried to simplify to make it more readable. I only realise how confusing my code is when I try to explain it to someone else.