Login  Register

Re: Force a GLCanvas size

Posted by Michael Bien on Feb 01, 2011; 5:17pm
URL: https://forum.jogamp.org/Force-a-GLCanvas-size-tp2393774p2398838.html

          JFrame frame = new JFrame("asdf");
         frame.getContentPane().setPreferredSize(new Dimension(400, 400));
         frame.pack();
         frame.setVisible(true);


creates a frame with a 400x400pix large content pane.

-michael


On 02/01/2011 06:08 PM, Leigh McRae [via jogamp] wrote:

>
> Thank you for the code but I don't think it works.  I can't get it to anyway.
> Maybe I have to create a Frame with a bogus canvas with the size I want.
> Then take measurements once it's shown and create the GLCanvas with the
> offsets.  I guess I can look into NEWT also but I was under the impression
> AWT was more stable.  I don't really need performance.
>
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://jogamp.762907.n3.nabble.com/Force-a-GLCanvas-size-tp2393774p2398730.html
> To start a new topic under jogamp, email [hidden email]
> To unsubscribe from jogamp, visit
http://michael-bien.com/