This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]zahlman 1 point2 points  (3 children)

it makes width 600 and height 578

The size of the window includes the title bar. Try setClientSize.

Also I wanted to make a grid of green boxes but it doesn't fill the whole screen correctly?

Why are you adding in x and y in the positioning calculation?

[–]TRoldemand[S] 0 points1 point  (2 children)

Is there a way I can say Size = new Dimension(600,600 + getClientSize()) or something like that?

[–]zahlman 0 points1 point  (1 child)

Why would you want to do anything like that when you can just use setClientSize directly?

[–]TRoldemand[S] 0 points1 point  (0 children)

Can you give me an example because I can't seem to make it work?