AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Adding Scrollbars to a canvas

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
Frank Meyer
Guest





PostPosted: Sat May 28, 2005 7:38 am    Post subject: Adding Scrollbars to a canvas Reply with quote



Hi newsgroup,

I hope this is one of my last questions, but nevertheless I'm still in
trouble with my project:

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(?)

Now I tried to use ScrollBar directly, as well as reading the API about the
JScrollPane but I'm still confused about how to use...

Once again, thanks very much in advance for any help.

With best regards

Frank


Back to top
Tor Iver Wilhelmsen
Guest





PostPosted: Sat May 28, 2005 9:52 am    Post subject: Re: Adding Scrollbars to a canvas Reply with quote



"Frank Meyer" <f.meyer (AT) 1und1 (DOT) de> writes:

Quote:
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.

Back to top
Frank Meyer
Guest





PostPosted: Sat May 28, 2005 12:12 pm    Post subject: Re: Adding Scrollbars to a canvas Reply with quote



Tor Iver,


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


Thanks, I'll try that.

Best

Frank



Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.