2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
9 * Created on 2010/09/06, 17:04:19
11 package twitter.gui.form;
13 import java.awt.Desktop;
20 public class AboutDialog extends javax.swing.JDialog {
22 /** Creates new form AboutDialog */
23 public AboutDialog(java.awt.Frame parent, boolean modal) {
28 this.getRootPane().setDefaultButton(jButton1);
31 /** This method is called from within the constructor to
32 * initialize the form.
33 * WARNING: Do NOT modify this code. The content of this method is
34 * always regenerated by the Form Editor.
36 @SuppressWarnings("unchecked")
37 // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
38 private void initComponents() {
40 jLabel1 = new javax.swing.JLabel();
41 jButton1 = new javax.swing.JButton();
42 jScrollPane1 = new javax.swing.JScrollPane();
43 jTextArea1 = new javax.swing.JTextArea();
44 jButton2 = new javax.swing.JButton();
46 setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
47 setTitle("About Nishio Tweet Manager");
49 jLabel1.setText("Nishio Tweet Manager version 0.6");
51 jButton1.setText("OK");
52 jButton1.addActionListener(new java.awt.event.ActionListener() {
53 public void actionPerformed(java.awt.event.ActionEvent evt) {
54 jButton1ActionPerformed(evt);
58 jTextArea1.setColumns(20);
59 jTextArea1.setRows(5);
60 jTextArea1.setText("本ソフトウェアはテスト段階のプログラムです。\n信頼性,完全性については一切保証しておりません。\n\n本ソフトウェアを利用したことにより、利用者が何らかの損害、\n不利益を被った場合でも、製作者はその責任を一切負いません。\n\nプログラムの更新情報等は下記サイトにて確認してください。\n意見要望もいつでも受け付けます.気軽に送ってください。\n\nhttp://densan-labs.net/software/ntm\n\nこのソフトウェアは以下のライブラリを利用しています.\n\nTwitter4Jを利用しています。\nCopyright (c) 2007 Yusuke Yamamoto All rights reserved. \nBSD Licenseに基づき使用を許可されています。\n\nOpenCSV http://opencsv.sourceforge.net/ を利用しています。\nApache License2.0に基づき使用を許可されています。\n\nApache Commons DBUtils http://commons.apache.org/dbutils/ を利用しています。\nApache License2.0に基づき使用を許可されています。");
61 jScrollPane1.setViewportView(jTextArea1);
63 jButton2.setText("サイトへ行く");
64 jButton2.addActionListener(new java.awt.event.ActionListener() {
65 public void actionPerformed(java.awt.event.ActionEvent evt) {
66 jButton2ActionPerformed(evt);
70 javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
71 getContentPane().setLayout(layout);
72 layout.setHorizontalGroup(
73 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
74 .addGroup(layout.createSequentialGroup()
76 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
77 .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 474, Short.MAX_VALUE)
78 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
79 .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 364, Short.MAX_VALUE)
80 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
81 .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE))
82 .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 474, Short.MAX_VALUE))
85 layout.setVerticalGroup(
86 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
87 .addGroup(layout.createSequentialGroup()
89 .addComponent(jLabel1)
90 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
91 .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 297, Short.MAX_VALUE)
92 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
93 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
94 .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
95 .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))
100 }// </editor-fold>//GEN-END:initComponents
102 private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
103 this.setVisible(false);
104 }//GEN-LAST:event_jButton1ActionPerformed
106 private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
109 URL url = new URL("http://densan-labs.net/software/ntm");
110 // デフォルトのブラウザを使ってリンク先を表示
111 Desktop dp = Desktop.getDesktop();
112 dp.browse(url.toURI());
113 } catch (Exception ex) {
114 ex.printStackTrace();
116 }//GEN-LAST:event_jButton2ActionPerformed
119 * @param args the command line arguments
121 public static void main(String args[]) {
122 java.awt.EventQueue.invokeLater(new Runnable() {
125 AboutDialog dialog = new AboutDialog(new javax.swing.JFrame(), true);
126 dialog.addWindowListener(new java.awt.event.WindowAdapter() {
128 public void windowClosing(java.awt.event.WindowEvent e) {
132 dialog.setVisible(true);
136 // Variables declaration - do not modify//GEN-BEGIN:variables
137 private javax.swing.JButton jButton1;
138 private javax.swing.JButton jButton2;
139 private javax.swing.JLabel jLabel1;
140 private javax.swing.JScrollPane jScrollPane1;
141 private javax.swing.JTextArea jTextArea1;
142 // End of variables declaration//GEN-END:variables