How do i go about having 3 panels ontop of a main panel and inside each of these panels i have 2 buttons on the left hand side and a canvas on the remaining part of the panel. I am finding this tricky as the BorderLayout is very limited i.e north south east or west etc are the only choices available. How do i get around this?? Many thanks. DK
This is certainly possible, you can add a Canvas to your Applet and Panels to your Canvas and then add Buttons to the Panels, etc., etc., making a nested structure. Personally I like to use GridBagLayout to layout Applets. It's kind of comparable to using tables in HTML: every Component has it's own "cell" and you can have some Components stretch across more than one cell if you like. You can read more about it here: http://java.sun.com/docs/books/tutorial/uiswing/layout/gridbag.html
Joined: Feb 27, 2004
I was told that I could not add jpanels to a canvas, so instead I created a main Jpanel and added 3 jpanels to it, then i want to create a canvas in each jpanel, is this possible?? I had one main canvas but now i want to break it up to put different parts on each of the 3 jpanels.