private void runFromFile() {
        if (sqlModelFactory.isActive()) {
            JOptionPane.showMessageDialog(this, "Please wait until the current query finishes ...");
            return;
        }

        FileDialog fd = new FileDialog(SqlToolkit.getParentFrame(this), "Find Class File ...", FileDialog.LOAD);
        if (prevDir != null) {
            fd.setDirectory(prevDir);
        }
        fd.setVisible(true);

        String path = fd.getDirectory();
        String file = fd.getFile();
        if (file != null) {
            prevDir = path;
            Path fpath = Paths.get(path, file);
            try {
                List<String> queries = Files.readAllLines(fpath, Charset.forName("UTF-8"));
                dbDef = (DbDefinition) serverListCB.getSelectedItem();
                if (dbDef == null) {
                    JOptionPane.showMessageDialog(this, "No database server defined", "",
                            JOptionPane.WARNING_MESSAGE);
                    messageArea.setText("");
                    redBtnPush(false);
                    return;
                }

                Connection conn = ConnectionManager.GetConnection(dbDef, true);
                if (conn == null) {
                    messageArea.setText(ConnectionManager.GetConnectionError(dbDef));
                    tabbedPane.setSelectedComponent(messagePane);
                    redBtnPush(false);
                    return;
                }

                resultTableModel = sqlModelFactory.createModelData(conn, queries);
                resultTable.setModel(resultTableModel);
                if (isQueryResultsSplit) {
                    tabbedPane.setSelectedComponent(resultPane);
                } else {
                    tabbedPane.setSelectedComponent(querySplitPane);
                }

                monitorQuery();
            } catch (IOException e) {
                JOptionPane.showMessageDialog(this, "Unable to read queries from file: " + fpath);
            }
        }
    }