Netbeans - illegal start of expresion java netbeans estaba creando con usuario y contraseña y tengo error en p

 
Vista:
sin imagen de perfil

illegal start of expresion java netbeans estaba creando con usuario y contraseña y tengo error en p

Publicado por cristian (1 intervención) el 17/09/2021 02:43:24
import java.awt.Color;
import javax.swing.JOptionPane;


import java.util.*;

import java.text.DateFormat;


/**
*
* @author Estudiante3
*/
public class FormularioNextDataPoint extends javax.swing.JFrame {

private String dia, mes, año, hora, minutos, segundos;
private final Calendar calendario = new GregorianCalendar();
Thread hilo;
public void run( ){

public FormularioNextDataPoint() {
initComponents();
this.setResizable(false);
//Color JFrame
this.getContentPane().setBackground(Color.white);
//Color JPanel


private void txtUsuarioActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
dispose();
}

private void jpassClaveActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
char clave[]=jpassClave.getPassword();

String clavedef=new String(clave);


if (txtUsuario.getText().equals("admin") && clavedef.equals("12345")) {

this.dispose();


JOptionPane.showMessageDialog(null, "Bienvenido\n"
+ "Has ingresado satisfactoriamente al sistema", "Mensaje de bienvenida",
JOptionPane.INFORMATION_MESSAGE);


ventana2 Vent2 = new ventana2 () ;

Vent2.setVisible(true);


}else {


JOptionPane.showMessageDialog(null, "Acceso denegado:\n"
+ "Por favor ingrese un usuario y/o contraseña correctos", "Acceso denegado",
JOptionPane.ERROR_MESSAGE);
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(FormularioNextDataPoint.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(FormularioNextDataPoint.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(FormularioNextDataPoint.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(FormularioNextDataPoint.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>

/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new FormularioNextDataPoint().setVisible(true);

}
});
}
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder