Results 1 to 4 of 4
  1. #1
    SteM is offline Member
    Join Date
    Nov 2007
    Posts
    6
    Rep Power
    0

    Default Scroll thumb on the ScrollPanel

    Hi all,
    i need to change the default scroll thumb on a ScrollPanel with a custom bitmap.
    How can i do it ??

    Thanks
    Last edited by SteM; 11-21-2007 at 09:53 AM.

  2. #2
    SteM is offline Member
    Join Date
    Nov 2007
    Posts
    6
    Rep Power
    0

    Default

    Well, I wrote a class extending the standard JScrollPane in which I forced a new version of the JScrollBar; in the paint function I put a scaled bitmap.
    Now my problem is:
    which is the size & position of the up/down-arrow buttons ???

    Thanks

  3. #3
    SteM is offline Member
    Join Date
    Nov 2007
    Posts
    6
    Rep Power
    0

    Default

    Hi all,
    in the same way i drawn the thumb on the scrollbar (paint() function of a custom scrollbar instance) i drawn the arrow buttons with custom bitmaps.
    The problem is that when the application starts i see the new bitmaps but when i press them i see the default gray buttons !!!!
    How can i solve?
    How can i access to these buttons owned by the scrollbar?

    Thanks

  4. #4
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    8

    Default

    You may have to write some plaf code. I would start with the BasicScrollBarUI class and look for the paintThumb method.

Similar Threads

  1. code hint scroll bar ?
    By tryit in forum Eclipse
    Replies: 3
    Last Post: 04-28-2008, 07:07 AM
  2. Jtextarea and scroll
    By ziniestro in forum AWT / Swing
    Replies: 2
    Last Post: 06-01-2007, 03:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •