Question: I was wondering on how I would create a method that opens up a new jframe in a separate window that will allow me to search through information. At the moment I have a button that says click me, however, I want to put in an event whereby once it is clicked, it will open up a new window that a user can input a string to search through information. Should I create a new class for the Jframe? any tips and code would be greatly appreciated. Thanks!

Answer: 
Suggestions:

* Don't use a second JFrame. Instead display a JDialog or JOptionPane that is dependent on the original JFrame.
* You can use multiple classes or create the gui in the current class, depending on how complex things are and how much you care about maintaining this code later. It's usually better to separate out different jobs in different classes though.
* Avoid subclassing top level windows such as JFrames and JDialogs. Usually it's better to have your code geared towards creating JPanels and then using the JPanels in whatever top level window is needed at the time to display them.
* Be sure to study the Swing tutorials as all the information needed to create this can be found there.
* As far as sample code, there's plenty to be found in this forum by searching it, some of it even is good code.
Depending on the complexity of this '2nd frame', you could use an inner class, or make it separate. Either way, just have the event listener on your button fire up an instance of this new class, which either is or creates a new Jframe and sets it to visible.