• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

setting size of Container

 
Ranch Hand
Posts: 250
1
Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having trouble setting the size of my Container. From the code below, when I place Container gamePane in a resizable JFrame and expand the frame, the spacing of the gamePane's contents expands to match the size of the frame despite my various attempts to keep the gameFrame at a set size.

 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
> when I place Container gamePane in a resizable JFrame and expand the frame, the spacing of the gamePane's contents expands to match the size of the frame

if you're adding it via the frame's default layoutManager (BorderLayout), it will always occupy all the space.

couple of ways to do it here

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic