Setting up classes before JFrame