Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SWT Composites, how to make new "zero" location  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I currently have code as such:


(This is just the top part of the code and just an example). What I'm trying to figure out is how to make the bottom of the composite the new "zero" for the next composite I want to set underneath it. Normally I would just write it all out in a single form but this project is waaaay too massive for that. And I could really use the help.

Internet cookie to all who can help
 
Marshal
Posts: 59108
180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Not sure what to do in SWT, but in Swing you would use a layout on the parent Component, giving preferred sizes to each included (child) Component and then call pack(). That will set the size of the whole display to accommodate all its children.
 
Creativity is allowing yourself to make mistakes; art is knowing which ones to keep. Keep this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!