private void jButton0MouseMouseClicked(MouseEvent event) { String sql = jTextField0.getText(); String seporator = (String) jComboBox0.getSelectedItem(); String csvName = jTextField1.getText(); String character = (String) jComboBox1.getSelectedItem(); if (sql == null || "".equals(sql)) { jLabel0.setForeground(Color.red); } else { jLabel0.setForeground(Color.black); } if (csvName == null || "".equals(csvName)) { jLabel3.setForeground(Color.red); } else { jLabel3.setForeground(Color.black); } if (";".equals(sql.substring(sql.length() - 1, sql.length()))) { System.out.println("substring"); sql = sql.substring(0, sql.length() - 1); } if (!"".equals(sql) & !"".equals(csvName)) { if (seporator == "space") { seporator = " "; } else if (seporator == "tab") { seporator = "\t"; } ProcessData.sqlQuery(csvName, character, seporator, sql); } System.out.println(sql + seporator + csvName + character); }