well i have a swing component that supposed to write strings on a jtextarea
but i have a problem with tread that updates that string everything compiles but when used
some Exception is thrown ....
what dose it mean what is the problem?????
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: PFrame$Ru nClass at PFrame.songGeter(PFrame.java:92) at ActListener.actionPerformed(ActListener.java:28) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:19 95) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav a:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel .java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242 ) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL istener.java:236) at java.awt.Component.processMouseEvent(Component.java:6038) at javax.swing.JComponent.processMouseEvent(JComponent.java:3260) at java.awt.Component.processEvent(Component.java:5803) at java.awt.Container.processEvent(Container.java:2058) at java.awt.Component.dispatchEventImpl(Component.java:4410) at java.awt.Container.dispatchEventImpl(Container.java:2116) at java.awt.Component.dispatchEvent(Component.java:4240) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322 ) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916) at java.awt.Container.dispatchEventImpl(Container.java:2102) at java.awt.Window.dispatchEventImpl(Window.java:2429) at java.awt.Component.dispatchEvent(Component.java:4240) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre ad.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread. java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre ad.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
here is my code
public void songGeter(File inputFile) { myDirectory = inputFile; FileGeter dir1 = new FileGeter(); dir1.fileGet(myDirectory); Thread myThread = new Thread(new RunClass(dir1)); myThread.start(); } public class RunClass implements Runnable { FileGeter dir1; public RunClass(FileGeter dir) { this.dir1 =dir; } public void run() { Id3Tag tag1; Collections.sort(dir1.bFiles, new Mp3Comparator()); // in the comparator the files that are sent to id3tag well show as is there's no tag because of the sorting -don't mind if (!dir1.bFiles.isEmpty() ){ // if open for (int h = 0 ; h < dir1.bFiles.size(); h++) { tag1 = new Id3Tag(dir1.bFiles.get(h)); setTextBox(tag1.getArtist()); } } //if close else { //System.out.println("no files "+myDirectory.exists()); } } public void setTextBox(final String str) { SwingUtilities.invokeLater(new Runnable() { public void run() { textBox.append(str +'\n'); } }); } }
thanks