Custom scrollbar thumb

Discussion in 'Java' started by Ste M, Aug 25, 2004.

  1. Ste M

    Ste M Guest

    Hi all,
    i'm writing an application using UIManager and metal theme.
    I'd like to use a bitmap to have a custom scrollbar thumb, but how can i do it ?

    Thanks !
    --
    Stefano M
     
    Ste M, Aug 25, 2004
    #1
    1. Advertising

  2. Ste M

    Paul Lutus Guest

    Ste M wrote:

    > Hi all,
    > i'm writing an application using UIManager and metal theme.
    > I'd like to use a bitmap to have a custom scrollbar thumb, but how can i
    > do it ?


    Java programming?

    When you have some code, post it.

    --
    Paul Lutus
    http://www.arachnoid.com
     
    Paul Lutus, Aug 25, 2004
    #2
    1. Advertising

  3. Ste M

    Chris Uppal Guest

    Paul Lutus wrote:

    > > i'm writing an application using UIManager and metal theme.
    > > I'd like to use a bitmap to have a custom scrollbar thumb, but how can i
    > > do it ?

    >
    > Java programming?
    >
    > When you have some code, post it.


    ?!

    This has to be in the running for some kind of "Most Useless Response of the
    Week" award.

    -- chris
     
    Chris Uppal, Aug 25, 2004
    #3
  4. Ste M

    Paul Lutus Guest

    Chris Uppal wrote:

    > Paul Lutus wrote:
    >
    >> > i'm writing an application using UIManager and metal theme.
    >> > I'd like to use a bitmap to have a custom scrollbar thumb, but how can
    >> > i do it ?

    >>
    >> Java programming?
    >>
    >> When you have some code, post it.

    >
    > ?!
    >
    > This has to be in the running for some kind of "Most Useless Response of
    > the Week" award.


    The OP didn't post any source code. Posting source code is essential to
    making any progress. I said so.

    Until he actually tries to create a class with custom graphics, and begins
    to describe the specifics, any effort to discuss the issue is equivalent to
    onanism.

    --
    Paul Lutus
    http://www.arachnoid.com
     
    Paul Lutus, Aug 25, 2004
    #4
  5. Ste M

    Chris Uppal Guest

    Paul Lutus wrote:

    > > > When you have some code, post it.

    > >
    > > ?!
    > >
    > > This has to be in the running for some kind of "Most Useless Response of
    > > the Week" award.

    >
    > The OP didn't post any source code. Posting source code is essential to
    > making any progress. I said so.


    Bollocks.

    -- chris

    [BTW, to Stefano (the OP) I'm sorry but I don't know where to start looking to
    find out how to change the appearance of the scrollbar]
     
    Chris Uppal, Aug 25, 2004
    #5
  6. Ste M

    Paul Lutus Guest

    Chris Uppal wrote:

    > Paul Lutus wrote:
    >
    >> > > When you have some code, post it.
    >> >
    >> > ?!
    >> >
    >> > This has to be in the running for some kind of "Most Useless Response
    >> > of the Week" award.

    >>
    >> The OP didn't post any source code. Posting source code is essential to
    >> making any progress. I said so.

    >
    > Bollocks.


    Terrific argument. Take your education over, this time add science and
    debate.

    > [BTW, to Stefano (the OP) I'm sorry but I don't know where to start
    > [looking to
    > find out how to change the appearance of the scrollbar]


    But, notwithstanding that, you are sure my advice is of no use. Interesting
    position.

    --
    Paul Lutus
    http://www.arachnoid.com
     
    Paul Lutus, Aug 25, 2004
    #6
  7. Ste M

    Chris Uppal Guest

    Paul Lutus wrote:

    > > Bollocks.

    >
    > Terrific argument. Take your education over, this time add science and
    > debate.


    Not debate, punctuation.

    -- chris
     
    Chris Uppal, Aug 25, 2004
    #7
  8. Ste M

    Ste M Guest

    Sorry, I don't want to generate a so big debate ...... :)

    My poor solution now is duplicate all the original classes related with
    javax.swing.plaf.metal, put them in a separate package and do some changes. In
    total 43 files.
    But i think it should be a better solution ....

    thanks
    --
    Stefano M
     
    Ste M, Aug 26, 2004
    #8
  9. On Wed, 25 Aug 2004 10:24:33 +0200, Ste M wrote:

    > i'm writing an application using UIManager and metal theme.
    > I'd like to use a bitmap to have a custom scrollbar thumb, but how can i do it ?

    ...
    > My poor solution now is duplicate all the original classes related with
    > javax.swing.plaf.metal, put them in a separate package and do some changes.
    > In total 43 files.
    > But i think it should be a better solution ....


    Might I suggest you put this question to the
    group that specializes in GUI matters (*referenced* from)
    <http://www.physci.org/codes/javafaq.jsp#cljg>

    HTH

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology
     
    Andrew Thompson, Aug 26, 2004
    #9
  10. Ste M

    Paul Lutus Guest

    Andrew Thompson wrote:

    > On Wed, 25 Aug 2004 10:24:33 +0200, Ste M wrote:
    >
    >> i'm writing an application using UIManager and metal theme.
    >> I'd like to use a bitmap to have a custom scrollbar thumb, but how can i
    >> do it ?

    > ..
    >> My poor solution now is duplicate all the original classes related with
    >> javax.swing.plaf.metal, put them in a separate package and do some
    >> changes. In total 43 files.
    >> But i think it should be a better solution ....

    >
    > Might I suggest you put this question to the
    > group that specializes in GUI matters (*referenced* from)
    > <http://www.physci.org/codes/javafaq.jsp#cljg>


    This is simply outrageous. Do you really expect everyone to go through your
    site in order to get to comp.lang.java.gui?

    This is predatory and unethical. It's like gangsters taxing people crossing
    a public bridge.

    Shame on you. Usenet is a free public forum, a commons. Don't pollute it.

    --
    Paul Lutus
    http://www.arachnoid.com
     
    Paul Lutus, Aug 26, 2004
    #10
  11. Andrew Thompson, Aug 26, 2004
    #11
  12. Ste M

    FISH Guest

    Paul Lutus <> wrote in message news:<>...
    > Chris Uppal wrote:

    [snipped...]

    > The OP didn't post any source code. Posting source code is essential to
    > making any progress. I said so.


    The conclusion being that he doesn't know where to begin. He's asking
    for a pointer, not a bug fix. Point him in the right direction, then
    he can produce some code for you to bug fix. ;-)


    -FISH- ><>
     
    FISH, Aug 26, 2004
    #12
  13. Ste M

    Paul Lutus Guest

    Andrew Thompson wrote:

    > On Thu, 26 Aug 2004 09:03:57 -0700, Paul Lutus wrote:
    >
    >> This is simply outrageous. Do you really expect everyone to go through
    >> your site in order to get to comp.lang.java.gui?

    >
    > No.


    In that case, don't offer this explicit misdirection through your site, just
    identify the target Usenet newsgroup. As has been pointed out to you before
    by more than one regular.

    --
    Paul Lutus
    http://www.arachnoid.com
     
    Paul Lutus, Aug 26, 2004
    #13
  14. Ste M

    Paul Lutus Guest

    FISH wrote:

    > Paul Lutus <> wrote in message
    > news:<>...
    >> Chris Uppal wrote:

    > [snipped...]
    >
    >> The OP didn't post any source code. Posting source code is essential to
    >> making any progress. I said so.

    >
    > The conclusion being that he doesn't know where to begin.


    This is comp.lang.java.programmer, not comp.lang.java.help. In any event, in
    both groups posting code is how you get the ball rolling.

    > He's asking
    > for a pointer, not a bug fix.


    We cannot offer pointers without something to point at. This is, after all,
    about computer programming, not philosophy.

    --
    Paul Lutus
    http://www.arachnoid.com
     
    Paul Lutus, Aug 26, 2004
    #14
  15. Ste M

    FISH Guest

    Paul Lutus <> wrote in message news:<>...
    > FISH wrote:
    >
    > > Paul Lutus <> wrote in message
    > > news:<>...
    > >> Chris Uppal wrote:

    > > [snipped...]
    > >
    > >> The OP didn't post any source code. Posting source code is essential to
    > >> making any progress. I said so.

    > >
    > > The conclusion being that he doesn't know where to begin.

    >
    > This is comp.lang.java.programmer, not comp.lang.java.help.


    That would be clj.programmer, not clj.bugfix? Aha - just checking,
    For a moment there I thought thought I had mistakenly slipped into
    a group for Java programmers... :)


    > In any event, in
    > both groups posting code is how you get the ball rolling.


    Fair enough. Here is my first attempt at a solution, please fix.

    public class ImageScrollBarThumb
    {
    }

    Please note: if you think my first attempt sucks, please demonstrate
    your contempt through the medium of source code. This is, after all,
    clj.programmer, not clj.help ;-)


    > > He's asking
    > > for a pointer, not a bug fix.

    >
    > We cannot offer pointers without something to point at. This is, after all,
    > about computer programming, not philosophy.


    He wants to put an image on the scrollbar thumb. That's the problem.
    He doesn't know where to begin. Can I presume from all this pedantic
    prevarication that you don't either...? :)

    I was hoping that someone might know of an easy way to do this, as
    the only solution I know of is rather advanced. As nobody has
    ventured a simple solution I suppose it's time for me to point the
    OP in the direction of the hard one. Basically, it requires the
    creating of a new PLaF scrollbar. Although not as hard as it may at
    first sound, there are lots of surrounding issues to do with Swing
    which may trip you up if you aren't well versed in its mechanics.

    Your best bet might be to see if there is a PLaF already out there
    which serves your needs (not looked at the upcoming skinnable one
    for 1.5/5.0 - perhaps that holds the answer?) Also, the O'Reilly
    'Java Swing' book has an example of rolling your own scrollbars.
    Check out chapter 26:- http://examples.oreilly.com/jswing2/code/

    There, that wasn't too hard. And I did all that without even a
    single line of source to refer from. Gosh, how clever am I? :)


    -FISH- ><>
     
    FISH, Aug 27, 2004
    #15
  16. Ste M

    zoopy Guest

    On 27-8-2004 17:11, FISH wrote:

    >>>Paul Lutus <> wrote in message
    >>>news:<>...
    >>>>The OP didn't post any source code. Posting source code is essential to
    >>>>making any progress. I said so.
    >>>


    [...]

    > That would be clj.programmer, not clj.bugfix? Aha - just checking,
    > For a moment there I thought thought I had mistakenly slipped into
    > a group for Java programmers... :)
    > -FISH- ><>




    OP reposted his question in c.l.gui a day later.

    Not everybody likes a warm welcome :)

    --
    Regards,
    Z.
     
    zoopy, Aug 27, 2004
    #16
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jack
    Replies:
    7
    Views:
    734
    Kevin Spencer
    Jul 2, 2004
  2. -
    Replies:
    7
    Views:
    453
    Tony Morris
    Feb 11, 2005
  3. Roedy Green

    nio rules of thumb

    Roedy Green, Oct 21, 2005, in forum: Java
    Replies:
    4
    Views:
    378
    Thomas Hawtin
    Oct 23, 2005
  4. utab
    Replies:
    9
    Views:
    333
    Richard Herring
    Jun 26, 2006
  5. Alex

    ScrollBar? Does it exist just WEB ScrollBar Control?

    Alex, Apr 1, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    275
    Alvin Bruney [MVP]
    Apr 4, 2004
Loading...

Share This Page