I just started using JFormDesigner. What i'am building is something to help me use my sprite, item/object config cache for a game. My problem is I keep getting NullPointerException on loading the JInternalFrame of the CacheEdit loading on to the main JPanel.

The error:
Java Code:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at com.robb.editor.guis.dialog.CacheDialog$2.actionPerformed(CacheDialog.java:37)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
	at java.awt.Component.processMouseEvent(Component.java:6263)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
	at java.awt.Component.processEvent(Component.java:6028)
	at java.awt.Container.processEvent(Container.java:2041)
	at java.awt.Component.dispatchEventImpl(Component.java:4630)
	at java.awt.Container.dispatchEventImpl(Container.java:2099)
	at java.awt.Component.dispatchEvent(Component.java:4460)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
	at java.awt.Container.dispatchEventImpl(Container.java:2085)
	at java.awt.Window.dispatchEventImpl(Window.java:2478)
	at java.awt.Component.dispatchEvent(Component.java:4460)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
How it works is a JFileChooser loads the three files into the editor. Then theres a button for editing/replacing the raw file or a button that opens a window the manually edits a sprite, item or object config, the second one doesn't work yet. When the first one is clicked it loads CacheDialog which is A combo box and you can choose which raw file to edit. But once I click okay and it throws that exception.

In CacheDialog this is what happens when the okay button is pressed.
Java Code:
			okayButton.setText("Okay");
			okayButton.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					Frame.frame.editCache(comboBox1.getSelectedIndex());
					dispose();
				}
			});
Heres the editCache method
Java Code:
	public void editCache(int index) {
		CacheEdit ce = new CacheEdit(index);
		mainPanel.add(ce);
	}
And this is the important part of what gets called with CacheEdit(index). Cache Edit extends JInternalFrame
Java Code:
				String[] filesData = new String[editingIndice.getNumFiles()];
				for (int i = 0; i < editingIndice.getNumFiles(); i++) {
					filesData[i] = String.valueOf(i);
				}
				fileList.setListData(filesData);
				fileList.addListSelectionListener(new ListSelectionListener() {
					public void valueChanged(ListSelectionEvent e) {
						if (fileList.getSelectedIndex() == -1) {
							currentFileIDLabel.setText("No file selected");
							currentFileSizeLabel.setText("");
							replaceFileButton.setEnabled(false);
							dumpFileButton.setEnabled(false);
							removeFileButton.setEnabled(false);
							return;
						}
						byte[] data = null;
						try {
							data = editingIndice.getFile(fileList.getSelectedIndex());
						} catch (IOException e1) {
							e1.printStackTrace();
						}
						if (data == null) {
							currentFileIDLabel.setText("File contains no data");
							currentFileSizeLabel.setText("");
							replaceFileButton.setEnabled(false);
							dumpFileButton.setEnabled(false);
							removeFileButton.setEnabled(false);
							return;
						}
						currentFileIDLabel.setText("File ID: " + fileList.getSelectedIndex());
						currentFileSizeLabel.setText("Size: " + data.length);
					}
				});
				scrollPane1.setViewportView(fileList);
Now I know theres nothing wrong with my getFile method because it works for the game.

Hopefully someone can help.