Fitting a JFrame around a JPanel, off by 1px issue.

Hi guys, so I’ve been having this issue for a while now, and I can’t seem to get it to work
My game is using multiple states (JPanels) that are using the CardLayout to switch between
Each game state. However, the JFrame seems to cut off the JPanels by 1px on the right and
Bottom of the panel.

Here is a picture of how it looks on startup (Notice the right and bottom red lines are not visible):


And here is what I want (Visible right and bottom lines):

Now the Game class is extending JFrame and the state classes are extending JPanel:
Here is the Game class’s init() code (Called after super()):


	public void init() {
        // Set values for the JFrame and game loop.
        setTitle("AI Game");
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        isRunning = true; // The game has started.

        stateCardsPanel = new JPanel(); // Base panel that will be added to the JFrame.
        stateCardsPanel.setLayout(new CardLayout());
        cardSwitcher = (CardLayout)stateCardsPanel.getLayout();

        menuState = new MenuState(this);
        playState = new PlayState(this);

        stateCardsPanel.setPreferredSize(new Dimension(Game.WIDTH, Game.HEIGHT)); // 640px X 720px
        stateCardsPanel.add(menuState, "Menu");
        stateCardsPanel.add(playState, "Play");

        // By default, the game should start with the menu state.
        currentState = menuState; // Keep track of which state is being displayed.
        add(stateCardsPanel);
        pack();

        setLocationRelativeTo(null);
        // setResizable(false);
        setVisible(true);
	}

And here is the GameState’s constructor (Both MenuState and PlayState extend GameState):


    public GameState(Game game) {
        super();
        this.game = game;
        setPreferredSize(new Dimension(Game.WIDTH, Game.HEIGHT));
        setFocusable(true);
        setDoubleBuffered(true);
    }

And I guess the last place where I think could be causing this issue is in the rendering of the tiles.
Here is the code rendering the tiles in case my math is wrong:


   /* 
   Each tile is 32px X 48px, 
   the map is 20 tiles X 15 tiles
   Game.WIDTH = 640px, Game.HEIGHT = 720px */
	public void render(Graphics g) {
		for(int row = 0; row < tiles.length; row++)
		{
			for(int col = 0; col < tiles[row].length; col++)
			{
				if(tiles[row][col] == TileType.GRASS)
				{
					g.drawImage(grass, col * tileWidth, row * tileHeight, tileWidth, tileHeight, null);
               g.setColor(Color.RED);
               g.drawRect(col * tileWidth, row * tileHeight, tileWidth, tileHeight); // Red lines.
				}
				else if(tiles[row][col] == TileType.LAVA)
				{
					g.drawImage(lava, col * tileWidth, row * tileHeight, tileWidth, tileHeight, null);
               g.setColor(Color.RED);
               g.drawRect(col * tileWidth, row * tileHeight, tileWidth, tileHeight); // Red lines.
				}
			}
		}
	}

If you guys need any more info, let me know!
I appreciate any help,
Thanks!

Figured it out!