Hi i am having an issue with this error "java.lang.NullPointerExpectation:null (in java.awt.Container)", it wasn't happening until i added the jpanel any solutions?
package folderCreating; import java.io.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class window extends JFrame{ private JTextField textField1; private JButton button1; private JTextField textField2; private JButton button2; private JButton button3; private JButton button4; public static String fileInput; public static String folderInput; public window(){ super("File and Folder Manager"); setLayout(new FlowLayout()); JPanel p1 = new JPanel(); p1.add(textField1); p1.add(button2); add(p1); textField2 = new JTextField(20); add(textField2); button1 = new JButton("Create Folder"); add(button1); textField1 = new JTextField(20); add(textField1); button2 = new JButton("Create File"); add(button2); }