8/9/01 9:57:23 AM, Renoir Sewjee <[EMAIL PROTECTED]> wrote:

>> Can a canvas 3D work as one half of a Swing JSplitPane? I've tried it and I
>> can slide the splitter to make the canvas bigger, but not smaller. I'd like
>> to have a JTree as the other half, and the user may want to slide the split
>> pane so as to have more room to read the tree nodes.
>
>I first put my canvas3D in a JPanel and then add the JPanel  to a JSplitPane.
>I then use the following methods to set the minimum and maximum size of the
>JPanel to (0,0).
>        panel.setMinimumSize(new Dimension(0, 0))
>        panel.setMaximumSize(new Dimension(0, 0))
>
>which allow the JSplitPane to resize the JPanel larger and smaller.
when I add my canvas in a jpanel then the canvas doesn't show up
I use this code :
    JPanel canvasPanel = new JPanel();
    canvasPanel.add(getCanvas());
    iSplitPaneMain = new 
JSplitPane(JSplitPane.HORIZONTAL_SPLIT,false,canvasPanel,getSplitPaneRight());
    iSplitPaneMain.setDividerLocation(256);

When I don't put it first in a panel then it does show up...

greets,
mattie

===========================================================================
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".

Reply via email to