Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

AWT Scrollbar

Thread view: 
Selie Peter - 02 Apr 2006 16:42 GMT
Hello,

I'm developing an application on a PDA.
Now I want to use scrollbars (because it's a small screen :-) ).
It works fine with the option "scrollbar_always", but in one class I "paint"
the panel with a kind of map and he don't want to add scrollbars here...
I work now like this: create ScrollPane and add my panel to it. Then I add
this to the "main frame".
Does anybody know how to solve this?

Greetz
Rhino - 02 Apr 2006 20:48 GMT
> Hello,
>
[quoted text clipped - 8 lines]
>
> Greetz

I don't think your question makes sense. If you're developing a Java
application for a PDA, I assume you are using J2ME since it is the API for
small devices like PDAs. But J2ME doesn't use AWT and none of its GUI
components have scrollbars as far as I know.

Or am I missing some key assumption behind your question?

--
Rhino
Selie Peter - 03 Apr 2006 08:17 GMT
>> Hello,
>>
[quoted text clipped - 18 lines]
> --
> Rhino

Well, Actually it's more a port from an existing application to PDA.
But not written in J2ME.
Remon van Vliet - 03 Apr 2006 16:18 GMT
>>> Hello,
>>>
[quoted text clipped - 21 lines]
> Well, Actually it's more a port from an existing application to PDA.
> But not written in J2ME.

If it's actually AWT (java.awt.*) we're talking about here then i dont think
you really understand it as well as needed. A panel wont spontaneously add
scrollbars if you happen to paint outside of it's component bounds. Your
ScrollPane approach is a valid way to do what you need to do, but be sure to
optimize the paint(Graphics g) method of your custom component to only draw
the visible part of your map if drawing is cpu intensive.

Remon van Vliet


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.