Custom ProgressBar

Hi,
I need a simple progress bar with a white border, white foreground and black background for a applet I’m doing.

I’ve been trying to use the JProgressBar but can’t get the exact look. I’ve used the Metal look and feel, but I get a little line between the border and the bar I think it’s from the Metal look and feel border.

Now I’m using the look and feel of the system where you are running the applet (so a JFileChooser looks like the system), but the progress bar looks like the system progress bar’s too but that’s now that is needed.

I’ve been looking how to do this but I’m not finding anything. I thought I need to create a custom JProgressBar class with a custom paint() method, but I can’t find the default code one so I can edit it and don’t know if this is the best way to go.

Can anyone show me some link to how this should be done?

Thanks

IMHO the “classic” “default” “de facto standard” look and feel are often what the user expects because that’s what they usually get.

It’s important to balance having something “custom” that’s great against the possibilty that it might confuse some users.

At least that’s the logic I used when I “thought about it” and decided not to bother :shifty:

That said, I suppose you could do usabilty testing to ensure the somewhat different look and feel aren’t turning people off.

There are look and feel classes that you would have to implement yourself.

I’ve never done that work, but I’ve thought about it, but I guess in the long run that doesn’t count for much huh?

If it isn’t super important, I would just pick a look and feel and go with the default look. My guess is the work to change the look and feel is going to be fairly intensive.

By any means, I’m not a swing or applet programmer. However, it seems like there are themes could be applied like the one you mentioned like “Metal” or “System”. I’m guessing there is a way to create custom theme. I would go w/ this approach then going w/ extending that class. Just a suggestion.