reshape() being called at wrong time

Hi,

I have added a GLCanvas to a JFrame. The JFrame also contains a JPanel (which contains a JTextarea). If I change the text in the JTextArea then the GLCanvas.reshape() method is unwantedly called.

Does anybody know how I can get round the JTextArea causing a GLCanvas.respape() problem and/or why it happens in the first place?

Regards,

Sally

Specifically call setPreferredSize on the textarea, that will override it’s own attempt to determine the best size based on the text. This is more of a Swing/AWT type of issue than a JOGL thing unless I am misunderstanding the problem.

Hi,

Thanks for that reply. It didn’t actually work, but I don’t have a problem anymore as I changed the JTextArea to a JTextField (which I should have used in the first place as I don’t need to type more than one line) and this fixed the problem :slight_smile:

Txs.

Sally