001    /**
002       ##############################################################################
003       ##                                                                          ##
004       ## EnvInfo                                                                  ##
005       ##                                                                          ##
006       ## Copyright (C) 2009  Frederic Roudaut  <frederic.roudaut@free.fr>         ##
007       ##                                                                          ##
008       ##                                                                          ##
009       ## This program is free software: you can redistribute it and/or modify     ##
010       ## it under the terms of the GNU General Public License as published by     ##
011       ## the Free Software Foundation, either version 3 of the License, or        ##
012       ## (at your option) any later version.                                      ##
013       ##                                                                          ##
014       ## This program is distributed in the hope that it will be useful,          ##
015       ## but WITHOUT ANY WARRANTY; without even the implied warranty of           ##
016       ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            ##
017       ## GNU General Public License for more details.                             ##
018       ##                                                                          ##
019       ## You should have received a copy of the GNU General Public License        ##
020       ## along with this program.  If not, see <http://www.gnu.org/licenses/>.    ##
021       ##                                                                          ##
022       ##                                                                          ##
023       ##############################################################################
024    **/
025    
026    
027    
028    package com.envInfo;  
029    
030    import javax.swing.JFrame;
031    import javax.swing.JPanel;
032    import javax.swing.JButton;
033    import javax.swing.*;
034    import java.awt.event.*;
035    
036    
037    
038    /**
039     * A Demonstrator class for showing User Info, Java Info, System Info
040     *
041     */
042    public class EnvInfo
043    {
044        private static final long serialVersionUID = 1L;    
045      
046     /**
047       * 
048       * A Main Exemple.
049       *
050       */  
051    
052    public static void main ( String args[] )
053        {   
054            JFrame f = new JFrame("Info");
055            f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);      
056            JPanel textPanel = new JPanel();
057    
058            JButton userInfobutton = new JButton(Info.ressources.getObject("User_Info").toString());
059            userInfobutton.addActionListener(new ActionListener() { 
060                    public void actionPerformed(ActionEvent e) {
061                        new UserInfo();
062                    }});     
063            textPanel.add(userInfobutton);
064    
065            JButton javaInfobutton = new JButton(Info.ressources.getObject("Java_Info").toString());
066            javaInfobutton.addActionListener(new ActionListener() { 
067                    public void actionPerformed(ActionEvent e) {
068                        new JavaInfo();
069                    }});     
070            textPanel.add(javaInfobutton);
071    
072            JButton systemInfobutton = new JButton(Info.ressources.getObject("System_Info").toString());
073            systemInfobutton.addActionListener(new ActionListener() {       
074                    public void actionPerformed(ActionEvent e) {
075                        new SystemInfo();
076                    }});     
077            textPanel.add(systemInfobutton);
078            
079            f.add(textPanel);
080            f.pack();
081            f.setVisible(true);             
082        }
083    }