1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
|
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
public class Fenetre extends javax.swing.JFrame implements ActionListener {
public static final Object Object = null;
public Object jButton5;
public Object jButton4;
public Object jButton3;
public Object jButton2;
public Object jButton1;
/**
* Creates new form Interface
*/
public Fenetre() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
//<editor-fold defaultstate="collapsed" desc="Generated Code">
public void initComponents() {
JButton jButton1 = new javax.swing.JButton();
JButton jButton2 = new javax.swing.JButton();
JButton jButton3 = new javax.swing.JButton();
JButton jButton4 = new javax.swing.JButton();
JButton jButton5 = new javax.swing.JButton();
setTitle("DVD 3A INFORMATIQUE");
setPreferredSize(new java.awt.Dimension(1005, 650));
setResizable(false);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setContentPane(new ImageFond());
setVisible(true);
jButton1.setText("DVD 3A");
jButton1.setForeground(new java.awt.Color(255, 0, 0));
jButton1.setPreferredSize(new java.awt.Dimension(80, 20));
jButton1.addActionListener((ActionListener) this);
jButton2.setText("3A+ késako ?");
jButton2.setForeground(new java.awt.Color(255, 0, 0));
jButton2.setPreferredSize(new java.awt.Dimension(80, 20));
jButton2.addActionListener((ActionListener) this);
jButton3.setText("Navigation");
jButton3.setForeground(new java.awt.Color(255, 0, 0));
jButton3.setPreferredSize(new java.awt.Dimension(80, 20));
jButton3.addActionListener((ActionListener) this);
jButton4.setText("Site Web");
jButton4.setForeground(new java.awt.Color(255, 0, 0));
jButton4.setPreferredSize(new java.awt.Dimension(80, 20));
jButton4.addActionListener((ActionListener) this);
jButton5.setText("Quitter");
jButton5.setForeground(new java.awt.Color(255, 0, 0));
jButton5.setPreferredSize(new java.awt.Dimension(80, 20));
jButton5.addActionListener((ActionListener) this);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(493, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(112, 112, 112))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(85, 85, 85))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(60, 60, 60))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(32, 32, 32))
.addComponent(jButton5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(23, 23, 23))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(209, Short.MAX_VALUE))
);
pack();
} // </editor-fold>
public void actionPerformed(ActionEvent e) {
Object source = e.getSource();
if(Object == jButton1){
setTitle("DVD 3A INFORMATIQUE");
setPreferredSize(new java.awt.Dimension(1005, 650));
setResizable(false);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setContentPane(new ImageFond());
setVisible(true);
}
if(Object == jButton2){
setTitle("DVD 3A INFORMATIQUE");
setPreferredSize(new java.awt.Dimension(1005, 650));
setResizable(false);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setContentPane(new ImageFond2());
setVisible(true);
}
if(Object == jButton3)
BrowserControl.displayURL("files://...");
if(Object == jButton4)
BrowserControl.displayURL("http://www.3a-informatique.com");
if(Object == jButton5)
System.exit(0);
} |
Partager