title: How to make an individual JPanel larger within a JFrame
body: <p>I am making a game and i have multiple panels within my frame. panel4 is supposed to contain my wheel, the problem is that panel4 is the same size as all of the other panels on the board when i need panel4 to be much larger because i want the picture of the wheel to fully display because as it stands, only the top part of the wheel is showing when i need all of it to show.     </p>
  
  <pre><code> public static void setUp() throws IOException {        
      frame=new JFrame();
      frame.setLayout(new GridLayout(7,1));
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.setLocation(290, 5);
      frame.setSize(1100, 1100);
      frame.setTitle("Wheel of fortune");
  
      final JPanel scorePanel=new JPanel();
      final JPanel namePanel=new JPanel();
      final JPanel panel=new JPanel(new GridLayout(1,3,1,1));
      final JPanel panel1=new JPanel();
      final JPanel panel2=new JPanel();
      final JPanel panel3=new JPanel(new GridLayout(2,1,1,1));
  
      panel3.add(new JLabel("Dead letters/phrases:"));
      panel3.add(LettersOrPhGuessed);
  
      scorePanel.add(new JLabel("Score Board:"));
  
  
      final WheelGui test = new WheelGui();
      final JPanel panel4=test;
      panel4.setSize(800, 600);//this does nothing in the program
  
  
      namePanel.add(playerName);
      frame.getContentPane().add(namePanel);
      frame.getContentPane().add(scorePanel);
      frame.getContentPane().add(panel);
      frame.getContentPane().add(panel4);
      frame.getContentPane().add(panel2);
      frame.getContentPane().add(panel1);
      frame.getContentPane().add(panel3);
      frame.setVisible(true);
  }
  </code></pre>
  
  <p>this is where i construct the essence of panel4. i have tried to make this panel larger but when i do, nothing appears to happen on the screen. Any suggestions would be great.</p>
  
  <pre><code>@SuppressWarnings("serial")
  public class WheelGui extends JPanel{
  ImageIcon image = new ImageIcon("WheelofFortune.JPG");    
  JPanel rotationPanel;  
  final int WIDTH = 800;  
  final int HEIGHT = 600;  
  static double degrees;  
  
  public WheelGui()  
  {  
      super();
      this.setPreferredSize(new Dimension(WIDTH,HEIGHT));  
      setBackground(Color.lightGray);  
      setLayout(null);  
      setFocusable(true);  
      rotationPanel = new JPanel(); 
  
      rotationPanel = new turningCanvas();  
      rotationPanel.setPreferredSize(new Dimension(image.getIconWidth(),image.getIconHeight()));  
      //rotationPanel.setSize(800,600);  
      add(rotationPanel);  
      rotationPanel.setBounds(WIDTH/8, HEIGHT/8, rotationPanel.getPreferredSize().width, rotationPanel.getPreferredSize().height);  
      degrees = 0;  
  }  
  public void paintComponent (Graphics g)  
  {  
      super.paintComponent(g);  
  }  
  public class turningCanvas extends JPanel  
  {  
      public void paintComponent (Graphics g)  
      {  
          super.paintComponent(g);  
          Graphics2D g2d = (Graphics2D)g;  
          g2d.rotate(Math.toRadians(degrees),image.getIconWidth()/2,image.getIconHeight()/2);  
          image.paintIcon(this, g2d, 0, 0);  
  
      }  
  }   
  public void rotate(){
      for(int i=0;i&lt;360;i+=4){
          degrees++;
          repaint();
          try {
              Thread.sleep(10);
          } catch (InterruptedException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
      }
  }
  </code></pre>