search query and showing the results in a jtable
i would like to execute a search query and show the results in a Jtable the jcombobox is just to choose an option of search for exemple searching with names age or Id or any thing else  this is the code source :
 try {
    	            
    	            
    	                Class.forName("com.mysql.jdbc.Driver");
    	                String connectionUrl = "jdbc:mysql://localhost/db?" +
    	                                       "user=root&password=";
    	                con = DriverManager.getConnection(connectionUrl);
    	                Statement state = con.createStatement();
    	    			
    	    			 ResultSet result = state.executeQuery("SELECT * FROM db.atelier where '"+jComboBox1.getSelectedItem().toString()+"'='"+jTextField1.getText().toString()+"'");
    	     			//On rïcupïe les MetaData
    	     			ResultSetMetaData resultMeta = result.getMetaData();
    	     			
    	     			
    	     			
    	     			while(result.next()){			
    	     			  model.addRow(new Object[]{result.getObject(1),result.getObject(2)});		
    	     			model.setDataVector(new Object[][]{{result.getObject(1),result.getObject(2)},{}}, new Object[]{resultMeta.getColumnName(1),resultMeta.getColumnName(2)});
    	                       	
    	     			}
    	     			
    	                        jPanel1.revalidate();
    	                        model.fireTableDataChanged();
    	     			this.repaint();
    	                            state.close();
    	        } catch (SQLException e) {
    	                System.out.println("SQL Exception: "+ e.toString());
    	        } catch (ClassNotFoundException cE) {
    	                System.out.println("Class Not Found Exception: "+ cE.toString());
    	        }
    	            
    	    con=null;
    	      
    	       
    	        
    	    }
    
search query and showing the results in a jtable
===

i would like to execute a search query and show the results in a Jtable the jcombobox is just to choose an option of search for exemple searching with names age or Id or any thing else  this is the code source :
 try {
    	            
    	            
    	                Class.forName("com.mysql.jdbc.Driver");
    	                String connectionUrl = "jdbc:mysql://localhost/db?" +
    	                                       "user=root&password=";
    	                con = DriverManager.getConnection(connectionUrl);
    	                Statement state = con.createStatement();
    	    			
    	    			 ResultSet result = state.executeQuery("SELECT * FROM db.atelier where '"+jComboBox1.getSelectedItem().toString()+"'='"+jTextField1.getText().toString()+"'");
    	     			//On rïcupïe les MetaData
    	     			ResultSetMetaData resultMeta = result.getMetaData();
    	     			
    	     			
    	     			
    	     			while(result.next()){			
    	     			  model.addRow(new Object[]{result.getObject(1),result.getObject(2)});		
    	     			model.setDataVector(new Object[][]{{result.getObject(1),result.getObject(2)},{}}, new Object[]{resultMeta.getColumnName(1),resultMeta.getColumnName(2)});
    	                       	
    	     			}
    	     			
    	                        jPanel1.revalidate();
    	                        model.fireTableDataChanged();
    	     			this.repaint();
    	                            state.close();
    	        } catch (SQLException e) {
    	                System.out.println("SQL Exception: "+ e.toString());
    	        } catch (ClassNotFoundException cE) {
    	                System.out.println("Class Not Found Exception: "+ cE.toString());
    	        }
    	            
    	    con=null;
    	      
    	       
    	        
    	    }
    