my program uses an xml
file to determine what info is displayed on the GUI. I thought it would be nice to add a file chooser so you can select the xml file more easily, then having to rename it to the hard coded name. When the gui Launches it is set to undecorated so that it is full screen. However, once I added the JFileChooser
it does not work and returns:
java.awt.IllegalComponentStateException: The frame is displayable.
How can I go about fixing this?
This is what I have at the JFileChooser
area:
JFileChooser FE = new JFileChooser();
int status = FE.showOpenDialog(FB);
if(status==JFileChooser.APPROVE_OPTION)
{
if (FE.getSelectedFile().exists())
{
f=FE.getSelectedFile();
}
}
try {
// Finds the file and parses the file into a document
//File fXmlFile = new File("OPEXDataVisualizationScript.xml");
File fXmlFile = f;