GIF « JEditorPane « Java Swing Q&A





1. Java gif image consuming CPU and memory    stackoverflow.com

in my application i do intensive use of animated gif images displayed in a JEditorPane (this is a chat). Now i realyzed that the GIFs consume a lot of CPU (near 100% ...

2. cant display gif/jpeg in JEditorPane ?    coderanch.com

I figured it out... the IMG tag can only take the URL of the image... you are giving it a path to the image... here's an example of what to do : import java.io.File; import java.net.MalformedURLException; import java.net.URL; import javax.swing.JEditorPane; import javax.swing.JFrame; import javax.swing.JScrollPane; public class EditPicTest extends JFrame { private JEditorPane edit; public EditPicTest() { super( "JEditorPane - IMG tag ...