• 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

handling component paint

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'm trying to do something that seems hard to me but I'm sure someone of you has got the solution:
I have a LayeredPane that contains a ScrollPane.
In LayeredPane first I create the ScrollPane than I fix dimensions for LayeredPane (this is due to the fact that I'd like to make possible setting dimensions of the component in design and not into the code).
In this way I can't read from within ScrollPane the dimensions of its container!
I'm looking for the way to get dinamically the dimension of the container to adapt dimensions of component inside...
Thank you all. Bye
Alfredo
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can attach a ComponentListener to the component that is changing size and have it tell the other component.
 
alfredo navarra
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you,
I tried with ContainerListener and it worked but ComponentListener seems to be better since my solution was just a workaround...
bye,
alfredo
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic