This commit is contained in:
Emmanuel Srivastava
2025-01-30 15:58:46 +01:00
parent b1fa4d63d9
commit 1859f1cb67
9 changed files with 169 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import javax.swing.*;
import java.awt.*;
public class Piege {
public static void main(String[] args){
JFrame frame = new JFrame("Piege");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLayout(null);
JButton btn1 = new JButton("1");
btn1.setLocation(1,1);
btn1.setSize(400,50);
JButton btn2 = new JButton("2");
btn2.setLocation(400,1);
btn2.setSize(100,400);
frame.add(btn1);
frame.add(btn2);
frame.setSize(500,500);
frame.setLocation(500,250);
frame.setVisible(true);
}
}