123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- /*
- * AboutBox.java
- *
- * Created on 18. November 2007, 11:28
- */
- package schemaspygui;
- import javax.swing.*;
- /**
- *
- * @author joachim uhl; mailto:admin@joachim-uhl.de; http://www.joachim-uhl.de/projekte/schemaspygui/
- */
- public class AboutBox extends javax.swing.JDialog {
-
- /** Creates new form AboutBox */
- public AboutBox(JFrame gui) {
- startup(gui);
- }
-
- /** 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">//GEN-BEGIN:initComponents
- private void initComponents() {
- jDialog1 = new javax.swing.JDialog();
- jPanel1 = new javax.swing.JPanel();
- button_CLOSE = new javax.swing.JButton();
- jLabel1 = new javax.swing.JLabel();
- jLabel2 = new javax.swing.JLabel();
- jScrollPane1 = new javax.swing.JScrollPane();
- jEditorPane1 = new javax.swing.JEditorPane();
- FormListener formListener = new FormListener();
- org.jdesktop.layout.GroupLayout jDialog1Layout = new org.jdesktop.layout.GroupLayout(jDialog1.getContentPane());
- jDialog1.getContentPane().setLayout(jDialog1Layout);
- jDialog1Layout.setHorizontalGroup(
- jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(0, 400, Short.MAX_VALUE)
- );
- jDialog1Layout.setVerticalGroup(
- jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(0, 300, Short.MAX_VALUE)
- );
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- button_CLOSE.setText("Close"); // NOI18N
- button_CLOSE.addActionListener(formListener);
- jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18));
- java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("schemaspygui/resources/ReleaseText"); // NOI18N
- jLabel1.setText(bundle.getString("ProgramName")); // NOI18N
- jLabel2.setText(bundle.getString("VersionInfo")); // NOI18N
- jEditorPane1.setBorder(null);
- jEditorPane1.setContentType("text/html"); // NOI18N
- jEditorPane1.setEditable(false);
- jEditorPane1.setText(bundle.getString("ReleaseText")); // NOI18N
- jScrollPane1.setViewportView(jEditorPane1);
- org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
- jPanel1.setLayout(jPanel1Layout);
- jPanel1Layout.setHorizontalGroup(
- jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel1Layout.createSequentialGroup()
- .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel1Layout.createSequentialGroup()
- .add(127, 127, 127)
- .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.CENTER)
- .add(jLabel2)
- .add(jLabel1)))
- .add(jPanel1Layout.createSequentialGroup()
- .add(170, 170, 170)
- .add(button_CLOSE))
- .add(jPanel1Layout.createSequentialGroup()
- .addContainerGap()
- .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 382, Short.MAX_VALUE)))
- .addContainerGap())
- );
- jPanel1Layout.setVerticalGroup(
- jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel1Layout.createSequentialGroup()
- .addContainerGap()
- .add(jLabel1)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jLabel2)
- .add(18, 18, 18)
- .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 271, Short.MAX_VALUE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(button_CLOSE)
- .addContainerGap())
- );
- org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- );
- pack();
- }
- // Code for dispatching events from components to event handlers.
- private class FormListener implements java.awt.event.ActionListener {
- FormListener() {}
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- if (evt.getSource() == button_CLOSE) {
- AboutBox.this.button_CLOSEActionPerformed(evt);
- }
- }
- }// </editor-fold>//GEN-END:initComponents
- private void startup(JFrame gui) {
- initComponents();
- //setLocation(gui.getLocation().x+210, gui.getLocation().y+40 );
- setLocationRelativeTo(gui);
- }
-
- private void button_CLOSEActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button_CLOSEActionPerformed
- this.setVisible(false);
- }//GEN-LAST:event_button_CLOSEActionPerformed
-
-
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton button_CLOSE;
- private javax.swing.JDialog jDialog1;
- private javax.swing.JEditorPane jEditorPane1;
- private javax.swing.JLabel jLabel1;
- private javax.swing.JLabel jLabel2;
- private javax.swing.JPanel jPanel1;
- private javax.swing.JScrollPane jScrollPane1;
- // End of variables declaration//GEN-END:variables
-
- }
|