Eclipse - Necesito ayuda con un proyecto

 
Vista:
sin imagen de perfil

Necesito ayuda con un proyecto

Publicado por Agustin (1 intervención) el 19/11/2021 03:30:23
al crear una ventana donde tengo la opcion de registrarme e ingresar,el problema es que me registra el usuario pero cuando quiero ingresar y le doy al boton no pasa nada como si no estuviese guardado [code]import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

import Logica.Systema;

import javax.swing.JTextField;
import javax.swing.JTextArea;
import javax.swing.JButton;
import java.awt.Color;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JTextPane;
import javax.swing.JLabel;
import java.awt.Font;

public class Ventana1 extends JFrame {
private JPanel contentPane;
Systema s1= new Systema();
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
Ventana1 frame = new Ventana1();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}

public Ventana1() {

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 450, 300);
contentPane = new JPanel();
contentPane.setBackground(Color.LIGHT_GRAY);
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);

JButton btnRegistrarse = new JButton("Registrarse");
btnRegistrarse.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
Ventana3 v=new Ventana3(s1);
v.setVisible(true);
}
});
btnRegistrarse.setBounds(280, 191, 89, 23);
contentPane.add(btnRegistrarse);

JLabel lblNewLabel = new JLabel("BITCOIN ACCOUNT");
lblNewLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 16));
lblNewLabel.setBounds(141, 96, 143, 14);
contentPane.add(lblNewLabel);

JButton btnNewButton = new JButton("Ingresar");
btnNewButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
Ventana2 v=new Ventana2(s1);
v.setVisible(true);

}
});
btnNewButton.setBounds(64, 191, 89, 23);
contentPane.add(btnNewButton);
}
}
/code]
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