title: Create Table Database Using SQL in Java
body: <p>I am new to java programming and still learning.
  I am trying to make a table in my database (in xammp) using sql code in Java.</p>
  
  <p>I found no any error but the code just failed to execute..
  I've tried fixed it many times and still have no any progress..</p>
  
  <p>Maybe somebody know how to fix my program, please tell me..
  That would be great.</p>
  
  <p>I use NetBeans btw..</p>
  
  <p>This is my source code :</p>
  
  <pre><code>private void saveActionPerformed(java.awt.event.ActionEvent evt) {                                     
      String name=category_name_tf.getText();
  
          try  {
              Statement statement=(Statement) konek.GetConnection().createStatement();
              statement.execute("CREATE TABLE '"+name+"'('"+jakarta+"','"+bogor+ "','"
                  +depok+ "','"+tangerang + "','"+bekasi+"');");//Is this codes right?
              statement.close();
  
              JOptionPane.showMessageDialog(null,"New Category Added");
  
              category_name_tf.setText("");
          }catch (Exception t){
              JOptionPane.showMessageDialog(null,"Add Category Failed");
              category_name_tf.requestFocus();
          }
  
  
  }              
  </code></pre>