Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Exception in ProgressBar paint action

Posted on 2006-06-15
6
Medium Priority
?
360 Views
Last Modified: 2008-01-09
Could anyone tell me is there a known bug in ProgressBar code in the swing package?

Im getting the following exception

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
      at javax.swing.plaf.basic.BasicProgressBarUI.updateSizes(BasicProgressBarUI.java:428)
      at javax.swing.plaf.basic.BasicProgressBarUI.getBox(BasicProgressBarUI.java:385)
      at com.sun.java.swing.plaf.windows.WindowsProgressBarUI.paintIndeterminate(WindowsProgressBarUI.java:156)
      at javax.swing.plaf.basic.BasicProgressBarUI.paint(BasicProgressBarUI.java:350)
)

If there is, could you give me a link to where it has been reported?

Thanks a mill
mcgettiu
0
Comment
Question by:mcgettiu
  • 3
  • 2
6 Comments
 

Author Comment

by:mcgettiu
ID: 16918526
Hi objects

I saw that bug alright.....
They had a subclass of JProgressBar that overrides setIndeterminate() and isIndeterminate() - that was the root of the problem there.

I am actually just using JProgressBar so dont think that bug applies to me.

0
 
LVL 92

Expert Comment

by:objects
ID: 16918559
so you're not doing anything exotic?
One thing to check is that you aren't updating the progress bar from a thread other than the event dispatch thread.
If you're not then probleably worth reporting as a bug.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:mcgettiu
ID: 16919160
The exception isn't thrown all the time......

If it was the case that the progress bar was being updated by a thread other than the event dispatch thread - I assume the exception would be thrown everytime???
0
 
LVL 92

Accepted Solution

by:
objects earned 2000 total points
ID: 16919171
not at all, in fact the opposite. Updating the gui from a different thread *will* result in random exceptions.
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16920216
Yes, you should let the EDT do "its" job :)
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question