android - Java MySQL and JFrame connection "Cannot convert from boolean to connection" -
public class bancodedados { static string url = "jdbc:mysql://localhost:3306/estoque"; static string pass = "admin"; static string user = "admin"; static connection conexao = null; public static boolean conecta() throws classnotfoundexception { try { class.forname("mysql.driver"); conexao = drivermanager.getconnection(url, user, pass); //system.out.println("conectado."); joptionpane.showmessagedialog(null, "conectado com sucesso!"); return true; } catch (sqlexception e) { joptionpane.showmessagedialog(null, "usuário e/ou senha estão incorretos!"); //system.out.println("usuário e/ou senha estão errados."); return false; } } public class telaprincipal extends jframe { connection conexao = null; preparedstatement pst = null; resultset rs = null; private jpanel contentpane; private jtextfield textlogin; private jpasswordf...