Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import javax.swing.*;
- public class Classe extends JFrame {
- JButton cadastro = new JButton("Cadastro");
- JTextField login = new JTextField();
- JPasswordField senha = new JPasswordField();
- public Classe() {
- setSize(400,500);
- setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- setTitle("INTERFACE GRÁFICA JAVA");
- setLocation(450,100);
- getContentPane().setLayout(null);
- cadastro.setBounds(120, 220, 100, 20);
- getContentPane().add(cadastro);
- login.setBounds(100, 140, 140, 30);
- getContentPane().add(login);
- senha.setBounds(100, 175, 140, 30);
- senha.setEchoChar('$');
- getContentPane().add(senha);
- }
- public static void main(String[] args) {
- Classe janela = new Classe();
- janela.setVisible(true);
- janela.show();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement