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
|
public class popup {
private JPanel jContentPane = null;
private JLabel logo = new JLabel(new ImageIcon(Version.PathImageLogoAPropos));
private JLabel message = new JLabel();
private JButton ok = new JButton("OK");
public popup(){
for (AWTUtilities.Translucency translucency : AWTUtilities.Translucency.values()) {
if (AWTUtilities.isTranslucencySupported(translucency)) {
final JFrame frame = new JFrame("Apropos "+translucency);
frame.setAlwaysOnTop(true);
frame.setBackground(Color.white);
frame.setLocation(400, 300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(400,140);
frame.setUndecorated(true);
AWTUtilities.setWindowOpacity(frame, 0.5f);
this.jContentPane = new JPanel();
this.jContentPane.setLayout(null);
this.jContentPane.setOpaque(false);
this.message.setText("appli v0.4 BETA");
ok.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
//System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed()
//setVisible(false);
frame.dispose();
}
});
//jContentPane.add(titre);
jContentPane.add(logo);
jContentPane.add(message);
jContentPane.add(message2);
jContentPane.add(message3);
jContentPane.add(ok);
frame.setContentPane(this.jContentPane);
frame.setVisible(true);
}
}
}
} |
Partager