

/*
 * AboutBox.java
 *
 * Created on 29 juil. 2010, 17:31:33
 */

package net.atomique.ksar.UI;

import java.awt.Dimension;

import net.atomique.ksar.VersionNumber;

/**
 *
 * @author Max
 */
public class AboutBox extends javax.swing.JDialog {

    /** Creates new form AboutBox */
    public AboutBox(java.awt.Frame parent) {
        super(parent);
        initComponents();
        Dimension d1 = getSize();
        Dimension d2 = parent.getSize();
        int x = (d2.width -(d1.width/2) ) / 2 ;
        int y = (d2.height- (d1.height/2) )  /2 ;
        setBounds(x, y, d1.width, d1.height);
        setModal(true);
        setVisible(true);        
    }

    /** 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.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel3 = new javax.swing.JPanel();
        versionlabel = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        urllabel = new javax.swing.JLabel();
        authorlabel = new javax.swing.JLabel();
        licencelabel = new javax.swing.JLabel();
        tipslabel = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        OkButton = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.PAGE_AXIS));

        jPanel3.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));

        versionlabel.setText("kSar version: " + VersionNumber.getVersionNumber());

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 357, Short.MAX_VALUE)
            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel3Layout.createSequentialGroup()
                    .addGap(0, 118, Short.MAX_VALUE)
                    .addComponent(versionlabel)
                    .addGap(0, 119, Short.MAX_VALUE)))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 16, Short.MAX_VALUE)
            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel3Layout.createSequentialGroup()
                    .addGap(0, 0, Short.MAX_VALUE)
                    .addComponent(versionlabel)
                    .addGap(0, 0, Short.MAX_VALUE)))
        );

        getContentPane().add(jPanel3);

        jPanel2.setLayout(new javax.swing.BoxLayout(jPanel2, javax.swing.BoxLayout.PAGE_AXIS));

        urllabel.setText("website: http://sourceforge.net/projects/ksar/");
        jPanel2.add(urllabel);

        authorlabel.setText("Author: xavier cherif");
        jPanel2.add(authorlabel);

        licencelabel.setText("License: BSD (see LICENCE file)");
        jPanel2.add(licencelabel);

        tipslabel.setText("ARS LONGA, VITA BREVIS");
        jPanel2.add(tipslabel);

        getContentPane().add(jPanel2);

        OkButton.setText("Ok");
        OkButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                OkButtonActionPerformed(evt);
            }
        });
        jPanel1.add(OkButton);

        getContentPane().add(jPanel1);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void OkButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_OkButtonActionPerformed
        setVisible(false);
        dispose();
    }//GEN-LAST:event_OkButtonActionPerformed

   

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton OkButton;
    private javax.swing.JLabel authorlabel;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JLabel licencelabel;
    private javax.swing.JLabel tipslabel;
    private javax.swing.JLabel urllabel;
    private javax.swing.JLabel versionlabel;
    // End of variables declaration//GEN-END:variables

}

@@ -1318,54 +1318,8 @@
 ();%0A
-        tipslabel = new javax.swing.JLabel();%0A
     
@@ -3073,54 +3073,39 @@
 xt(%22
-website: 
 http
+s
 ://
-sourceforge.net/projects
+github.com/benbenw
 /ksar
-/
 %22);%0A
@@ -3165,17 +3165,26 @@
 etText(%22
-A
+Original a
 uthor: x
@@ -3339,94 +3339,8 @@
 );%0A%0A
-        tipslabel.setText(%22ARS LONGA, VITA BREVIS%22);%0A        jPanel2.add(tipslabel);%0A%0A
     
@@ -4297,50 +4297,8 @@
 el;%0A
-    private javax.swing.JLabel tipslabel;%0A
     

Change about box link