Andreas,
The solution to your problem is to extend the canvas and override two
methods which control the size of the canvas. (This applies to Canvas and
Canvas3D). I'm not sure if this is a lightweight/heavyweight problem or a
problem with layout.
Add the following code to your canvas subclass and the problem is fixed.
Regards,
Andy
// add following code
/**
* Returns the preferred allowable size of the Canvas.
* This has to be overridden in order to allow the canvas to resize
* in the splitframe. (is this a bug?)
*
* @return a Dimension of the preferred component size.
*/
public Dimension getPreferredSize() {
return new Dimension(400, 300); // set any size
}
/**
* Returns the minimum allowable size of the Canvas.
* This has to be overridden in order to allow the canvas to resize
* in the splitframe. (is this a bug?)
*
* @return a Dimension of the minimum component size.
*/
public Dimension getMinimumSize() {
return new Dimension(0, 0);
}
// end of addition
-----Original Message-----
From: Andreas Ebbert [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 15, 2000 12:16 PM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] JSplitPane and Canvas3D
Hi,
I have a canvas3d in a JSplitPane and now the divider will not move anymore
because it gets no events when it is dragged over canvas3d. is this another
topic of lightweight/heavyweight or am I just too dumb?
Thanks for your comments!
Andreas
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".