View.java 775 B

12345678910111213141516171819202122232425262728
  1. package main;
  2. import javax.swing.*;
  3. import java.awt.*;
  4. public class View extends JFrame {
  5. private JButton boutonExport= new JButton("Exporter");
  6. private JButton boutonReset = new JButton("Décocher cases");
  7. private JPanel pan = new JPanel();
  8. private GridLayout grid = new GridLayout();
  9. public static void main(String[] args){
  10. new View();
  11. }
  12. public View(){
  13. this.setTitle("Jul Project");
  14. this.setSize(800, 800);
  15. this.setLocationRelativeTo(null);
  16. this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  17. this.setLayout(new BorderLayout());
  18. this.getContentPane().add((pan), BorderLayout.SOUTH);
  19. pan.add(boutonExport);
  20. pan.add(boutonReset);
  21. this.setVisible(true);
  22. }
  23. }