How to Resize the window of my GUI?
<p>I normally resize my window using setSize() method but this time round it is not working? I want to resize the window to fit all my components in. I have taken out the majority of my code as it is irrelevant for my question but have left in what is needed. I have found questions with this similar problem but the solutions seem too complicated and I can't replicate them in my code. Here is my class:</p>

<pre><code>import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

@SuppressWarnings("serial")
public class Display extends JFrame {

    public Display() {
        super("Mandelbrot Set Display");

        JPanel jp = new JPanel();
        //setSize(1000, 1000); this doesnt resize window
        setBounds(0, 0, 800, 600);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        add(jp);

    }

    public static void main(String[] args) {
        new Display().setVisible(true);
    }
}
</code></pre>

<p>Thanks</p>