Question: I'm having a problem, creating a fixed-size overall panel for a touchscreen GUI application that has to take up the entire screen. In a nutshell, the touchscreen is 800 x 600 pixels, and therefore I want the main GUI panel to be that size.

When I start a new GUI project in NetBeans, I set the properties of the main panel for min/max/preferred size to 800 x 600, and the panel within the 'Design' view changes size. However, when I launch the app, it is resized to the original default size.

Adding this code after initComponents() does not help:

```
this.mainPanel.setSize(new Dimension(800,600));
this.mainPanel.setMaximumSize(new Dimension(800,600));
this.mainPanel.setMinimumSize(new Dimension(800,600));
this.mainPanel.repaint();

```

I've peeked into all of the resource files and cannot seem to find values that would override these (which seems somewhat impossible anyway, given that I'm setting them after initComponents() does its work). I'm using the FreeDesign layout, because I wanted complete control over where I put things.

I suspect the layout manager is resizing things based upon how many widgets I have on the screen, because different prototyped screens come in at differing sizes. 

Help is appreciated!

Answer: 
Have you tried [java full screen mode](http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html)?
I use this method to complete the task, not sure if its the best and you need to wait calling it until the frame is actually on the screen. 

```
protected void growBig()
  {
    int screenWidth = java.awt.Toolkit.getDefaultToolkit().getScreenSize().width;
    int screenHeight = java.awt.Toolkit.getDefaultToolkit().getScreenSize().height;
    Rectangle rectangle = getFrame().getBounds();
    rectangle.setSize(screenWidth, screenHeight);
    getFrame().setBounds(0, 0, screenWidth, screenHeight);
    getFrame().setSize(screenWidth, screenHeight);
    getFrame().doLayout();
    getFrame().validate();
    updateUI();
  }

```