• Post Reply Bookmark Topic Watch Topic
  • New Topic

Overflow  RSS feed

 
Andrew Robertson
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have a graphics overflow issue. I have a main window, it has a top panel of buttons, and a bottom panel of buttons, in the middle is an area for graphics work.
The problem is the graphics can be bigger than the area containing it, so i put a jscrollpane in it, and put the graphics panel in the scroll pane. when drawing the graphics it draws over the bottom button panel, in other words, overflowing the jscrollpane. I also want to have layers so i can control the visibility of each layer

I have tried:-
jpanel->jscrollpane->jlayerpane->graphics panel
jpanel->jscrolledpane->jpanel->jlayeredpane->graphics panel
jpanel->jpanel->jscrolledpane->jlayeredpane->graphics panel
jinternalframe->jscrolledpane->jlayeredpane->graphics panel
jinternalframe->jscrolledpane->jpanel->jlayeredpane->graphics panel
jinternalframe->jpanel->jscrolledpane->jlayeredpane->graphics panel

none of which contain the graphics!?
thanks!
 
Andrew Robertson
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been tinkering around to no avail, but I believe that the graphics is using the top-left corner as a base point, but using the whole main window frame as the drawing area, thus, i have to do one of two things, limit the graphics inheritance to the internal frame, or, somehow contain the graphics within a viewport!
thanks
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!