1 7 package net.sourceforge.ejtools.deploy; 8 9 import java.awt.BorderLayout ; 11 import java.awt.Color ; 12 import java.awt.Container ; 13 import java.awt.GridLayout ; 14 import java.util.ResourceBundle ; 15 16 import javax.swing.ImageIcon ; 17 import javax.swing.JLabel ; 18 import javax.swing.JPanel ; 19 20 import org.ejtools.adwt.service.AboutService; 21 22 30 public class AboutDialog implements AboutService 31 { 32 33 private final static ResourceBundle res = ResourceBundle.getBundle("ApplicationResources"); 34 35 private JPanel panel = null; 36 37 38 39 public AboutDialog() 40 { 41 } 42 43 public String getTitle() 44 { 45 return res.getString("title.about.dialog"); 46 } 47 48 53 public Container getPanel() 54 { 55 if (panel == null) 56 { 57 createPanel(); 58 } 59 return panel; 60 } 61 62 63 64 private void createPanel() 65 { 66 panel = new JPanel (new BorderLayout ()); 67 68 String display = null; 69 JLabel label = null; 70 71 panel.add("North", new JLabel (new ImageIcon (getClass().getResource("/images/logo.png")))); 73 74 panel.add("Center", new JLabel (res.getString("text.about.application"))); 76 77 JPanel info = new JPanel (new GridLayout (2, 1)); 79 JLabel java = new JLabel (res.getString("text.about.javaVersion") + " : " + System.getProperty("java.version"), JLabel.CENTER); 80 java.setForeground(Color.black); 81 info.add(java); 82 JLabel vm = new JLabel (res.getString("text.about.virtualMachine") + " : " + System.getProperty("java.vm.name") + ", " + System.getProperty("java.vm.version"), JLabel.CENTER); 83 vm.setForeground(Color.black); 84 info.add(vm); 85 panel.add("South", info); 86 } 87 } 88 89 90 | Popular Tags |