I have a swing application and want to have one of the frames within my application show an RSS feed based on a user selection. I have downloaded and added the jar file to my classpath, but I cannot integrate this with my Swing application. I have created an exact replica of JRSST.java in my project, but I cannot get it to compile. It basically cannot find any of the classes that JRSST.java uses but is included in the jar file. I cannot import them either because they are not part of any pckages. Any ideas how I can fix this?
Thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As of today, jrsst isn't organized to allow it to reside in another frame. I'm happy to do some reorganization so that it can. It will probably take a week or so. At that point, i can put the new version up and you can see if it works for you. If you want to look at the source, it comes in the jar file. Just 'jar xf JRSST*.jar' and you should be able to see everything. Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am getting the following exception message when running the code. What am I doing incorrectly?
Exception in thread "main" java.lang.IllegalArgumentException: Width (-1) and height (0) must be non-zero
at java.awt.image.ReplicateScaleFilter.<init>(ReplicateScaleFilter.java:85)
at java.awt.image.AreaAveragingScaleFilter.<init>(AreaAveragingScaleFilter.java:60)
at java.awt.Image.getScaledInstance(Image.java:152)
at edu.mscd.cs.jrsstlabel.JRSSTLabel.setThisIcon(JRSSTLabel.java:175)
at edu.mscd.cs.jrsstlabel.JRSSTLabel.loop(JRSSTLabel.java:202)
at edu.mscd.cs.jrsstlabel.JRSSTLabel.doit(JRSSTLabel.java:244)
at mine.TestReader.<init>(TestReader.java:28)
at mine.TestReader.main(TestReader.java:43)
I have a swing application and want to have one of the frames within my application show an RSS feed based on a user selection. I have downloaded and added the jar file to my classpath, but I cannot integrate this with my Swing application. I have created an exact replica of JRSST.java in my project, but I cannot get it to compile. It basically cannot find any of the classes that JRSST.java uses but is included in the jar file. I cannot import them either because they are not part of any pckages. Any ideas how I can fix this?
Thanks in advance.
As of today, jrsst isn't organized to allow it to reside in another frame. I'm happy to do some reorganization so that it can. It will probably take a week or so. At that point, i can put the new version up and you can see if it works for you. If you want to look at the source, it comes in the jar file. Just 'jar xf JRSST*.jar' and you should be able to see everything. Thanks!
Have you had a chance to reorganize the code to be able to include it in another frame?
Yep. I'm testing it now. I'll post a beta version today or tomorrow. Thanks!
Beta version posted and CVS updated. A number of packages created to facilitate incorporation into other programs. One should be able to:
import edu.mscd.cs.jrsstlabel.JRSSTLabel;
[...]
JRSSTLabel label = new JRSSTLabel (args);
label.doit ();
Let me know if this is what you were looking for and if it works for you. Thanks!
Thanks for the code update.
I am getting the following exception message when running the code. What am I doing incorrectly?
Exception in thread "main" java.lang.IllegalArgumentException: Width (-1) and height (0) must be non-zero
at java.awt.image.ReplicateScaleFilter.<init>(ReplicateScaleFilter.java:85)
at java.awt.image.AreaAveragingScaleFilter.<init>(AreaAveragingScaleFilter.java:60)
at java.awt.Image.getScaledInstance(Image.java:152)
at edu.mscd.cs.jrsstlabel.JRSSTLabel.setThisIcon(JRSSTLabel.java:175)
at edu.mscd.cs.jrsstlabel.JRSSTLabel.loop(JRSSTLabel.java:202)
at edu.mscd.cs.jrsstlabel.JRSSTLabel.doit(JRSSTLabel.java:244)
at mine.TestReader.<init>(TestReader.java:28)
at mine.TestReader.main(TestReader.java:43)
Here is the code:
package mine;
import edu.mscd.cs.jrsstlabel.JRSSTLabel;
import javax.swing.JFrame;
public class TestReader extends JFrame {
}
it seems Java doesn't know the size of the frame here. this works for me, let me know if it doesn't for you. thanks!
package mine;
import edu.mscd.cs.jrsstlabel.JRSSTLabel;
import javax.swing.JFrame;
public class TestReader extends JFrame
{
public TestReader(String feeds[])
{
super();
}