Slick Forums
http://slick.ninjacave.com/forum/

RFE: Set size of CanvasGameContainer
http://slick.ninjacave.com/forum/viewtopic.php?f=4&t=204
Page 1 of 1

Author:  TimRyanNZ [ Fri Feb 16, 2007 5:59 am ]
Post subject:  RFE: Set size of CanvasGameContainer

Would it be worth making it possible to set the size of the CanvasGameContainer so that it sizes correctly within a JFrame when pack() is used?

As a temporary solution I'll drop it into a JPanel and size that, but perhaps it would be nice if it obeyed the getPreferredSize etc stuff?

Author:  davedes [ Fri Feb 16, 2007 6:22 am ]
Post subject: 

Keep in mind that CanvasGameContainer extends AWTGLCanvas, which extends Canvas.

So it should already have those methods.

Author:  TimRyanNZ [ Fri Feb 16, 2007 7:11 am ]
Post subject:  So it does! Problem solved.

Sorry about that - I looked through the class and couldn't see anything, and it never occured to me to just try it.

D'oh! :oops:

Thanks,
Tim

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/