/* A basic implementation of the JDialog class. */ package SesameGUI; import java.awt.*; import javax.swing.*; public class JAboutDialog extends javax.swing.JDialog { public JAboutDialog(Frame parent) { super(parent); // This code is automatically generated by Visual Cafe when you add // components to the visual environment. It instantiates and initializes // the components. To modify the code, only use code syntax that matches // what Visual Cafe can generate, or Visual Cafe may be unable to back // parse your Java file into its visual environment. //{{INIT_CONTROLS getContentPane().setLayout(null); setSize(370,159); setVisible(false); JButton1.setText("OK"); getContentPane().add(JButton1); JButton1.setBounds(120,108,96,24); JLabel1.setText("JSESAME Version 1.08"); getContentPane().add(JLabel1); JLabel1.setBounds(96,12,156,36); JLabel2.setText("Developed under European Project SESAME 2000-2004"); getContentPane().add(JLabel2); JLabel2.setBounds(24,60,320,36); //}} //{{REGISTER_LISTENERS SymAction lSymAction = new SymAction(); JButton1.addActionListener(lSymAction); //}} } public JAboutDialog() { this((Frame)null); } public JAboutDialog(String sTitle) { this(); setTitle(sTitle); } public void setVisible(boolean b) { if (b) setLocation(50, 50); super.setVisible(b); } static public void main(String args[]) { (new JAboutDialog()).setVisible(true); } public void addNotify() { // Record the size of the window prior to calling parents addNotify. Dimension size = getSize(); super.addNotify(); if (frameSizeAdjusted) return; frameSizeAdjusted = true; // Adjust size of frame according to the insets Insets insets = getInsets(); setSize(insets.left + insets.right + size.width, insets.top + insets.bottom + size.height); } // Used by addNotify boolean frameSizeAdjusted = false; //{{DECLARE_CONTROLS javax.swing.JButton JButton1 = new javax.swing.JButton(); javax.swing.JLabel JLabel1 = new javax.swing.JLabel(); javax.swing.JLabel JLabel2 = new javax.swing.JLabel(); //}} class SymAction implements java.awt.event.ActionListener { public void actionPerformed(java.awt.event.ActionEvent event) { Object object = event.getSource(); if (object == JButton1) JButton1_actionPerformed(event); } } void JButton1_actionPerformed(java.awt.event.ActionEvent event) { setVisible(false); } }