Ciao!
come faccio a pulire l'area di testo textArea ogni volta che viene premuto un bottone in modo che i dati scritti vengano eliminati e sovrascritti?
Che metodo uso?e come?
Grazie!
if(PulsantePremuto==jButton4) {
try {
String s,p,r = new String();
Connection conn = DriverManager.getConnection("jdbcdbc
rova","ELISA","");
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT Nome_utente,Password,Ruolo FROM prova.dbo.Utente");
while(rs.next()) {
s=rs.getString("Nome_utente");
p=rs.getString("Password");
r=rs.getString("Ruolo");
textArea2.append(s + "\t" + p + "\t" + r + "\n");
}
rs.close();
stmt.close();
conn.close();
}
catch (Exception er) {er.printStackTrace();}
}
if(PulsantePremuto==jButton2) { //||(PulsantePremuto==jButton8)){
try { ....
}

dbc
rova","ELISA","");
Rispondi quotando
