When you create a GUI element such as a JFrame like this
new JFrame(); // nothing pointing to it.
is this wrong because there is nothing pointing to it, so it will be garbage collected. I realize this works, but I want to make sure this works all the time, even if the garbage collector runs.