Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Set the JProgressBar size

843806Dec 21 2008 — edited Dec 21 2008
Hi all,

I've added a JProgressBar in to a JFrame as follows.
        progBar = new JProgressBar(0, 100);
        progBar.setValue(0);
        progBar.setBorderPainted(true);
It's working fine. But I'm stuck on one thing. I cannot change the length of the JProgressBar. It's use a same length even I've change the length(width) of the JFrame. How can I change that.

I've read the doc, but didn't found the way to change it's size. Please help me.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 18 2009
Added on Dec 21 2008
4 comments
3,097 views