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.JPanel; 031 import javax.swing.JButton; 032 import java.awt.event.*; 033 import javax.swing.JApplet; 034 035 036 /** 037 * A Demonstrator Applet for showing User Info, Java Info, System Info 038 * 039 */ 040 public class EnvInfoApplet extends JApplet 041 { 042 private static final long serialVersionUID = 1L; 043 044 /** 045 * Called when the applet is first loaded. 046 * 047 */ 048 public void init () 049 { 050 051 JPanel textPanel = new JPanel(); 052 053 JButton userInfobutton = new JButton(Info.ressources.getObject("User_Info").toString()); 054 userInfobutton.addActionListener(new ActionListener() { 055 public void actionPerformed(ActionEvent e) { 056 new UserInfo(); 057 }}); 058 textPanel.add(userInfobutton); 059 060 JButton javaInfobutton = new JButton(Info.ressources.getObject("Java_Info").toString()); 061 javaInfobutton.addActionListener(new ActionListener() { 062 public void actionPerformed(ActionEvent e) { 063 new JavaInfo(); 064 }}); 065 textPanel.add(javaInfobutton); 066 067 JButton systemInfobutton = new JButton(Info.ressources.getObject("System_Info").toString()); 068 systemInfobutton.addActionListener(new ActionListener() { 069 public void actionPerformed(ActionEvent e) { 070 new SystemInfo(); 071 }}); 072 textPanel.add(systemInfobutton); 073 074 add(textPanel); 075 } 076 }