Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: You must supply an InputStream,

775 Views Asked by At

I'm trying to costumize a Synthetica theme in netbeans as this article shows :

http://www.jyloo.com/news/?pubId=1335947397000

So, I created the costum.xml file and I added it to my project folder as : /home/aimad/NetBeansProjects/GestionStock/costum.xml

and I create this code in my Form constructor :

public PersonelMainForm() {
        try {
            try {

                UIManager.setLookAndFeel(new SyntheticaStandardLookAndFeel() {
                    @Override
                    protected void loadCustomXML() throws ParseException {

                        loadXMLConfig("custom.xml");

                    }
                });

                setName("MainFrame");
                getRootPane().updateUI();


            } catch (UnsupportedLookAndFeelException ex) {
                Logger.getLogger(PersonelMainForm.class.getName()).log(Level.SEVERE, null, ex);
            }
        } catch (ParseException ex) {
            Logger.getLogger(PersonelMainForm.class.getName()).log(Level.SEVERE, null, ex);
        }

        initComponents();
    }

but when I run the program I get this error message :

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: You must supply an InputStream, StyleFactory and Class or URL at javax.swing.plaf.synth.SynthParser.parse(SynthParser.java:227) at javax.swing.plaf.synth.SynthLookAndFeel.load(SynthLookAndFeel.java:573) at de.javasoft.plaf.synthetica.SyntheticaLookAndFeel.loadXMLConfig(SyntheticaLookAndFeel.java:428) at Personel.PersonelMainForm$1.loadCustomXML(PersonelMainForm.java:34) at de.javasoft.plaf.synthetica.SyntheticaLookAndFeel.(SyntheticaLookAndFeel.java:364) at de.javasoft.plaf.synthetica.SyntheticaStandardLookAndFeel.(SyntheticaStandardLookAndFeel.java:30) at Personel.PersonelMainForm$1.(PersonelMainForm.java:30) at Personel.PersonelMainForm.(PersonelMainForm.java:30) at Personel.PersonelMainForm$3.run(PersonelMainForm.java:159) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:688) at java.awt.EventQueue$3.run(EventQueue.java:686) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:697) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

0

There are 0 best solutions below