[Ejtools-cvs] CVS: applications/jmx.browser/src/main/net/sourceforge/ejtools/jmxbrowser AboutDialog.
Brought to you by:
letiemble
From: Laurent E. <let...@us...> - 2002-04-22 17:38:28
|
Update of /cvsroot/ejtools/applications/jmx.browser/src/main/net/sourceforge/ejtools/jmxbrowser In directory usw-pr-cvs1:/tmp/cvs-serv28750/jmx.browser/src/main/net/sourceforge/ejtools/jmxbrowser Added Files: AboutDialog.java Log Message: Initial Import --- NEW FILE: AboutDialog.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.jmxbrowser; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Container; import java.awt.GridLayout; import java.beans.beancontext.BeanContextServiceProvider; import java.beans.beancontext.BeanContextServices; import java.beans.beancontext.BeanContextServicesSupport; import java.beans.beancontext.BeanContextSupport; import java.util.Iterator; import java.util.Vector; import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import net.sourceforge.ejtools.awt.action.Command; import net.sourceforge.ejtools.awt.action.help.AboutAction; import net.sourceforge.ejtools.awt.services.AboutService; import net.sourceforge.ejtools.awt.services.FrameService; import org.apache.log4j.Category; /** * Description of the Class * * @author letiembl * @created 2 novembre 2001 */ public class AboutDialog implements AboutService { /** Description of the Field */ private JPanel panel = null; /** Description of the Field */ private static Category cat = Category.getInstance(AboutDialog.class.getName()); /** Constructor for the AboutServiceProvider object */ public AboutDialog() { } /** * Gets the panel attribute of the AboutDialog object * * @return The panel value */ public Container getPanel() { if (panel == null) { createPanel(); } return panel; } /** Description of the Method */ private void createPanel() { panel = new JPanel(new BorderLayout()); String display = null; JLabel label = null; // North part panel.add("North", new JLabel(new ImageIcon(getClass().getResource("/images/logo.png")))); // Center part panel.add("Center", new JLabel("")); // South part JPanel info = new JPanel(new GridLayout(2, 1)); JLabel java = new JLabel("Java version:" + System.getProperty("java.version"), JLabel.CENTER); java.setForeground(Color.black); info.add(java); JLabel vm = new JLabel("VM:" + System.getProperty("java.vm.name") + ", " + System.getProperty("java.vm.version"), JLabel.CENTER); vm.setForeground(Color.black); info.add(vm); panel.add("South", info); } } |