package Application;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class Application1 extends JFrame implements ActionListener
{
    JButton b1;
    Application1(){
        setSize(700,600);
        setLayout(new FlowLayout());
        setDefaultCloseOperation(EXIT_ON_CLOSE);


    }
    public void labels(){
        JLabel line = new JLabel("HELLO!");
        add(line);
    }
    public void buttons(){
         b1 = new JButton("Click To Win");
        add(b1);
        b1.addActionListener(new Application1());
    }

    public void end() {
        setVisible(true);

    }
    public void actionPerformed(ActionEvent e) {


        JLabel b2 = new JLabel(" System Hacked \n You Lost!");

    }


    public static void main(String[] args) {
        Application1 app1 = new Application1();
        app1.labels();
        app1.buttons();

        app1.end();
    }
}