Having graphics resize in line with the Frame in Swing
Naming and Initialization

It's very hard to read when many variables are initialized on a single line.

numN naming pattern is also confusing. Since they correspond to coordinates, why not name them like this?

final int topLeftX = getWidth()/4
final int topLeftY = getHeight()/4
final int bottomRightX = ...


The 4 number may also be extracted into a vairable.

Draw a Rectangle

If I'm not mistaken, with drawLine(args) you are trying to draw a rectangle. It may be replaced with the respective method call, thus reducing the stuff to a single line:

g.drawRect(topLeftX, topLeftY, width, height);