aspose file tools
The moose likes Beginning Java and the fly likes GridBagLayout and Canvases Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "GridBagLayout and Canvases" Watch "GridBagLayout and Canvases" New topic
Author

GridBagLayout and Canvases

Chris Felton
Greenhorn

Joined: Aug 11, 2000
Posts: 6
Using Gridlayout, i can add canvasses (with pictures/drawings etc) no problem, but when I use GridBagLayout, I cannot get the canvas (or even a space on screen where the canvas should be) to appear.
Any Ideas ?
AJ Dussault
Ranch Hand

Joined: May 17, 2000
Posts: 53
Chris,
Are you setting the GridBagConstraints?
Chris Felton
Greenhorn

Joined: Aug 11, 2000
Posts: 6
Thanks for response. Yes I had set constraints, and I thought I had solved the problem but not so !
Even on the simplest of design, say 2 Rows,
if I change one to an image, then it disappears. This does NOT happen if I use GridLayout, and it doesn't make any difference if I add the image as a component of the GridBagLayout or of a Panel.
Thanks
[This message has been edited by Chris Felton (edited August 16, 2000).]
Chris Felton
Greenhorn

Joined: Aug 11, 2000
Posts: 6
Sorted !
I looked through some tutorials mentioned on the javaranch site and found one that mentioned that in some layouts, images are resized, and can be invisible, unless their size is set by the method that is doing the drawing !!!
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 18130

I'm moving this thread to the AWT/Swing forum ...
 
 
subject: GridBagLayout and Canvases
 
Threads others viewed
inserting canvas in a panel
MouseListener
Why does my canvas not display in side a gridbaglayout?
hi helpme
GridBagLayout and Canvases
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com