Fitting image on Canvas Control

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Myo Thura Lwin
    New Member
    • Jan 2010
    • 7

    #1

    Fitting image on Canvas Control

    Hello,

    I am facing one problem with canvas control of Visual Editor on eclipse galileo.
    I would like to show the image onto canvas in fitted size.
    But when the image is larger than the canvas, it became out of bound and I could not see the whole image.
    So, could you suggest me how to fixed the image on canvas control to be able to see the whole image.
    And then, the scroll bars of the canvas do not work.
    I am a new learner of java so I don't know about java much.
    I attach a text file with my code inside.


    Thank You.

    Regards,
    Myo Thura Lwin
    Attached Files
  • ThatThatGuy
    Recognized Expert Contributor
    • Jul 2009
    • 453

    #2
    Originally posted by Myo Thura Lwin
    Hello,

    I am facing one problem with canvas control of Visual Editor on eclipse galileo.
    I would like to show the image onto canvas in fitted size.
    But when the image is larger than the canvas, it became out of bound and I could not see the whole image.
    So, could you suggest me how to fixed the image on canvas control to be able to see the whole image.
    And then, the scroll bars of the canvas do not work.
    I am a new learner of java so I don't know about java much.
    I attach a text file with my code inside.


    Thank You.

    Regards,
    Myo Thura Lwin
    I don't know about canvas..
    if canvas is a control then try putting it inside the JScrollPane

    Comment

    Working...