package baseUFRHG; import javax.swing.JFrame; import javax.swing.JLabel; import java.awt.BorderLayout; import javax.swing.ImageIcon; import javax.swing.SwingConstants; public class Window_exempleMAJ extends JFrame{ private JFrame frame; public Window_exempleMAJ() { init(); } /** * */ private static final long serialVersionUID = 1L; public void init() { frame = new JFrame(); frame.setTitle("Gestion des inscriptions et des groupes - langues - informatique - stage - rentrée"); frame.setBounds(0, 0, 1300, 100); int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth(); int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight(); // frame.setLocation(( (screenWidth) - frame.getWidth()) / 2, (screenHeight - frame.getHeight()) / 2); frame.setSize(screenWidth, screenHeight); JLabel lblNewLabel = new JLabel(""); lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER); lblNewLabel.setIcon(new ImageIcon(Window_exempleMAJ.class.getResource("/resources/Exemple de mise à jour.png"))); frame.getContentPane().add(lblNewLabel, BorderLayout.CENTER); ImageIcon img = new ImageIcon(Window_demarre.class.getResource("/resources/logo.png")); frame.setIconImage(img.getImage()); frame.setResizable(false); frame.setVisible(true); } }