A "newb" (newbie, etc., etc. - all terms I despise, because they're meant as an excuse) should be willing and eager to change his/her code for the better. Hopefully, big changes result in big improvements or provide big lessons, which are not always the same thing. Apparently, your code does not do what you want it to, so changes are inevitable.
Review the
Java Tutorial Lessons on LayoutManagers. In fact, if you're new to Swing,
the entire Swing tutorial should be useful, but ignore the bias towards using the Netbeans GUI Builder and first learn to code graphical interfaces by hand. If you prefer videos, the New Boston series is highly rated, but I have neither the patience nor bandwidth to try them myself.
You've made other comments in your code and post that are confusing:
I prompt the user for the size of (2^n) . . . and . . . My program prompts the user for a power of 2 grid
I think you mean you prompt the user for one side of a square grid, or I do not understand what you're trying to do.
if(hc % 2 == 0){ //is a square
That's not a valid check for a perfect square.
public static void drawHole(Graphics g, int x, int y)
{
g.setColor(Color.WHITE);
g.fillRect(g,x,y);
}
This code suggests you were intending to fill a rectangle in a single JPanel at the coordinates ( x, y ). That is possible, but not in this way. If you'd like to pursue this approach further, make that clear.
There are several syntax or technical errors throughout your code. Surely you're getting errors when you try to compile. You should deal with those as best you can and then post those you'd like help with.