Border « JProgressBar « Java Swing Q&A





1. How to get rid of JProgressBar border (shadow?) in metal LaF    stackoverflow.com

I want to show user simple progress bar, something like http://storage8.static.itmages.ru/i/11/0709/h_1310172635_b034fb6005.png. I use this code:

progressBar = new JProgressBar();
progressBar.setBackground(Color.BLACK);
progressBar.setForeground(Color.WHITE);
progressBar.setBorder(BorderFactory.createCompoundBorder(
BorderFactory.createLineBorder(Color.WHITE, 2),
BorderFactory.createLineBorder(Color.BLACK, 2)));
It shows this - http://storage2.static.itmages.ru/i/11/0709/h_1310173171_7c85e4b1fa.png - awful border. How can ...

2. problem in border of progress bar    coderanch.com