• 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

JViewPort problems

 
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've got a panel which holds a row of buttons. If there are buttons on this panel which cannot be shown on the screen then a small button is placed at the north or south of this panel to let you scroll the remaining buttons into view (think of the control at the left side of MS Outlook). I'm using a JViewPort to bring the buttons into view. However the buttons are shown on the screen but when you try to click on the buttons the panels original layout is still intact. Let me explain this better.
Say I have 6 buttons and 3 are in view. Since 3 cannot be seen a small button will be placed at the south of the panel to allow you to scroll the remaining buttons into view. Say the first three buttons are named 1,2,3. When I press the button to scroll the other buttons to the screen buttons 4,5,6 are shown as expected. But when I try to press either 4, 5, or 6, buttons 1,2,3 are still in there original configuration and are painted over 4,5,6. So what appears to be happening is that the viewport is indeed showing me the rest of the buttons but the actual layout of the buttons is still the same, in other words the physical position of the buttons didn't change. How can I actually move the physical buttons? Should I be using a JViewPort to do this?
Thanks,
Frank
 
Frank Hale
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Forget it, I figured it out. I was explicitly setting the viewport back to 0,0 deep in the code. It only took me about 5 hours and about 2000 compiles later to find it. But alas everything is cool now!!!
Frank
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic