Skip to main content
GameDev.net gamedev.net
🔒 Locked

[java] Frame Size Problems

Started by Kentaro Dec 3, 2002 at 11:39 PM 1 replies 500+ views
Original Post
Kentaro
Kentaro
I created a frame and set its size to 200 by 400 but when I drew a 20x20 "block" to the screen at yPos 380 or xPos 180, it got cut off. I was thinking this had to do with the Insets but I tried adding them to the dimensions for the frame and it didn''t work. Is there any way that I can fix this problem? This isn''''t life in the fast lane, it''''s life in the oncoming traffic. -- Terry Pratchett
Over the centuries, mankind has tried many ways of combating the forces of evil...prayer,fasting, good works and so on. Up until Doom, no one seemed to have thought about thedouble-barrel shotgun. Eat leaden death, demon... -- Terry Pratchett
Petr Stedry
Petr Stedry
Hi,

you can always set the size of your component (some Canvas or JPanel) and then call "pack()" on the Frame/JFrame it''s inside.

maybe this helps

have a nice day ...
Petr Stedry
CaptainJester
CaptainJester
You''ll have to post some code, or link to the code to see what the problem is.



Make it work, then
make it fast.

"I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest!" --John Carmack: Forward to Graphics Programming Black Book
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.