Re: Adding Scrollbars to a canvas



"Frank Meyer" <f.meyer@xxxxxxxx> writes:

> I created a canvas whre some objects are drawn. Now it could be possible
> that the width of this canvas is too large for the screen width so I would
> need horizontal scrollbars to be able to scroll to the end of the canvas. My
> canvas class extends the JPanel object so maybe I have to use JScrollPane(?)

You should put the canvas into the viewport of a JScrollPane and let
that object do what it does best.
.



Relevant Pages

  • Adding Scrollbars to a canvas
    ... I created a canvas whre some objects are drawn. ... need horizontal scrollbars to be able to scroll to the end of the canvas. ... JScrollPane but I'm still confused about how to use... ...
    (comp.lang.java.help)
  • Re: Adding Scrollbars to a canvas
    ... > You should put the canvas into the viewport of a JScrollPane and let ... Prev by Date: ...
    (comp.lang.java.help)
  • Re: XSetClipMask on Windows?
    ... >> areas, like the XSetClipMask function? ... only the clipped area is drawn. ... The rest of the canvas takes the ... Afterwards the offline Pixmap with the ...
    (comp.lang.tcl)
  • Screen refresh with Tk8.5
    ... the the canvas would show and then the tree widget would be drawn). ... Has the update/idle behaviour been through a change for ...
    (comp.lang.tcl)
  • Touching objects on a canvas
    ... I have drawn two Ellipses on a Canvas - how can I ... I shudder when I remember doing loci in high school, ...
    (alt.comp.lang.borland-delphi)