• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

GUI Panel Usage

 
Greenhorn
Posts: 27
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Im Starting to move from text-based programs to graphics using GUI's, I've been watching some course to familiarize myself with the basics. Tutorial:
. So on any GUI I would see buttons, menus, progress bars, etc placed at specific locations. My Question is, is it best to set bounds for each component or to use several panels as containers for different parts. If bounds is the best way to go, are there any simple online softwares to help get the size/location of components(EX: Telling whatever software the screen size, drawing different boxes onto it and receiving bounds of each part as drawn). If Panels are better, should i be using several panels to organize each components/group of components or is there a better Layout Manager to assist with that?
 
Saloon Keeper
Posts: 8220
71
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Setting the bounds for everything is a bit brittle. Think about how you'd expect the GUI to behave if the window is resized. Layout managers are more resilient in this regard. And then there's GridBagLayout which is in a class by itself (see how I made a pun there?). It is very powerful but difficult to get your head around. Many people use a utility library called GBC (Grid Bag Constraint) to make the coding more manageable.
 
reply
    Bookmark Topic Watch Topic
  • New Topic