Custom scrollbar thumb

S

Ste M

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 !
 
P

Paul Lutus

Ste said:
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.
 
C

Chris Uppal

Paul said:
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
 
P

Paul Lutus

Chris said:
?!

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.
 
C

Chris Uppal

Paul said:
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]
 
P

Paul Lutus

Chris said:
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.
 
S

Ste M

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
 
A

Andrew Thompson

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
 
P

Paul Lutus

Andrew said:
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.
 
F

FISH

Paul Lutus said:
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- ><>
 
P

Paul Lutus

Andrew said:

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.
 
P

Paul Lutus

FISH said:
Paul Lutus said:
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.
 
F

FISH

Paul Lutus said:
FISH said:
Paul Lutus said:
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 ;-)

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- ><>
 
Z

zoopy

[...]

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 :)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top