private void jmi_delete_selected_tableActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jmi_delete_selected_tableActionPerformed
    {//GEN-HEADEREND:event_jmi_delete_selected_tableActionPerformed
        // TODO add your handling code here:

        TreePath selecktovana_putanja = jt_database_table_list.getSelectionPath();
        Log.logd(selecktovana_putanja.getPath()[0].getClass().getName());
        int velicina = selecktovana_putanja.getPathCount();
        DefaultMutableTreeNode dtn = (DefaultMutableTreeNode) selecktovana_putanja.getPathComponent(velicina - 1);
        Log.logd(dtn.toString());
        if (dtn.getUserObject().getClass().getName().equals(DBTable.class.getName()))
        {
            //delete table
            DefaultMutableTreeNode dtn_shem = (DefaultMutableTreeNode) selecktovana_putanja.getPathComponent(velicina - 2);
            DBShema dbs = (DBShema) dtn_shem.getUserObject();
            DBTable dbt = (DBTable) dtn.getUserObject();
            Object[] options =
            {
                "Da",
                "Ne"
            };
            int n = JOptionPane.showOptionDialog(this,
                    "Da li ste sigurni da zelite da obrisete tabelu " + dbt.getName() + "?",
                    "Potvrda",
                    JOptionPane.YES_NO_CANCEL_OPTION,
                    JOptionPane.QUESTION_MESSAGE,
                    null,
                    options,
                    options[1]);
            
            if(n==0)
            {
                sql_exe.set_query_and_exec("DROP TABLE "+dbs.getName()+"."+dbt.getName());
                set_data_tree();
            }

        } else if (dtn.getUserObject().getClass().getName().equals(DBShema.class.getName()))
        {
            //delete shema
        }



//        for(DefaultMutableTreeNode s:val)
//        {
//            Log.logd(s.toString());
//        }


    }//GEN-LAST:event_jmi_delete_selected_tableActionPerformed