Hello I'm currently stuck on an error Java is giving me.
--------------------Configuration: <Default>--------------------
Exception in thread "main" java.lang.NullPointerException
at java.awt.Container.addImpl(Container.java:1041)
at java.awt.Container.add(Container.java:959)
at javax.swing.JFrame.addImpl(JFrame.java:545)
at java.awt.Container.add(Container.java:927)
at ColorFactory.<init>(ColorFactory.java:21)
at ColorFactoryDemo.main(ColorFactoryDemo.java:5)
Process completed.
This is a simple code i have written. The purpose of my program is to change the colors of a text's (in the Center Region of the JPanel) foreground with the 3 different color JRadioButtons that are located on the south region of the panel and to chage the Center Panel's background with the JButtons that are located on the North region of the panel, but unfortunately i cannot even see the window because of the error i wrote above. I have included my code inside the ColorFactory.zip file and also have included the projects instructions on the PDF file, please help, i do not understand why i'm getting this error, i'm still a novice in programming, thank you
--------------------Configuration: <Default>--------------------
Exception in thread "main" java.lang.NullPointerException
at java.awt.Container.addImpl(Container.java:1041)
at java.awt.Container.add(Container.java:959)
at javax.swing.JFrame.addImpl(JFrame.java:545)
at java.awt.Container.add(Container.java:927)
at ColorFactory.<init>(ColorFactory.java:21)
at ColorFactoryDemo.main(ColorFactoryDemo.java:5)
Process completed.
This is a simple code i have written. The purpose of my program is to change the colors of a text's (in the Center Region of the JPanel) foreground with the 3 different color JRadioButtons that are located on the south region of the panel and to chage the Center Panel's background with the JButtons that are located on the North region of the panel, but unfortunately i cannot even see the window because of the error i wrote above. I have included my code inside the ColorFactory.zip file and also have included the projects instructions on the PDF file, please help, i do not understand why i'm getting this error, i'm still a novice in programming, thank you