/* * Jeti, a Java Jabber client, Copyright (C) 2001 E.S. de Boer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * For questions, comments etc, * use the website at http://jeti.jabberstudio.org * or mail/IM me at jeti@jabber.org */ package nu.fw.jeti.ui; import java.awt.SystemColor; import java.awt.event.ActionEvent; import javax.swing.*; import nu.fw.jeti.backend.Start; import nu.fw.jeti.plugins.PluginsInfo; import nu.fw.jeti.util.I18N; /*2001 * @author E.S. de Boer * @version 1.0 */ public class AboutWindow extends JFrame { public AboutWindow() { try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } private void jbInit() throws Exception { setTitle(I18N.gettext("main.about.About_JETI")); setDefaultCloseOperation(DISPOSE_ON_CLOSE); getContentPane().setLayout(new BoxLayout(getContentPane(),BoxLayout.Y_AXIS)); // Title JLabel label = new JLabel("JETI"+Start.OS2); label.setFont(new java.awt.Font("Serif", 1, 35)); label.setAlignmentX((float) 0.5); getContentPane().add(label); // Version label = new JLabel(I18N.gettext("main.about.Version") + " " + Start.VERSION); label.setAlignmentX((float) 0.5); getContentPane().add(label); label = new JLabel("http://www.jeti-im.org"); label.setAlignmentX(0.5f); getContentPane().add(label); label = new JLabel(" "); label.setAlignmentX(0.5f); getContentPane().add(label); label = new JLabel(".:: Customizado por CELEPAR ::."); label.setFont(new java.awt.Font("Serif",1,15)); label.setAlignmentX(0.5f); getContentPane().add(label); label = new JLabel("Cia de Inform\u00E1tica do Paran\u00E1"); label.setFont(new java.awt.Font("Serif",1,10)); label.setAlignmentX(0.5f); getContentPane().add(label); JTextPane textPane = new JTextPane(); textPane.setBackground(SystemColor.control); textPane.setEnabled(false); textPane.setFont(new java.awt.Font("Dialog", 1, 12)); textPane.setOpaque(false); textPane.setEditable(false); textPane.setText(PluginsInfo.getAbout()); textPane.setCaretPosition(0); JScrollPane scrollPane = new JScrollPane(textPane); scrollPane.setBorder(null); getContentPane().add(scrollPane); JButton button = new JButton(); button.setAlignmentX((float) 0.5); I18N.setTextAndMnemonic("Close",button); button.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { jButton1_actionPerformed(e); } }); getRootPane().setDefaultButton(button); getContentPane().add(button); setSize(300,250); setLocationRelativeTo(null); } void jButton1_actionPerformed(ActionEvent e) { this.dispose(); } } /* * Overrides for emacs * Local variables: * tab-width: 4 * End: */