Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JViewPort problems  RSS feed

 
Frank Hale
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!