1 7 package org.ejtools.management.browser; 8 9 import java.awt.BorderLayout ; 10 import java.awt.Color ; 11 import java.awt.Container ; 12 import java.awt.GridLayout ; 13 import java.util.ResourceBundle ; 14 15 import javax.swing.ImageIcon ; 16 import javax.swing.JLabel ; 17 import javax.swing.JPanel ; 18 import javax.swing.SwingConstants ; 19 import javax.swing.UIManager ; 20 21 import org.ejtools.adwt.service.AboutService; 22 23 30 public final class AboutDialog implements AboutService 31 { 32 33 private JPanel panel = null; 34 35 private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.management.browser.Resources"); 36 37 38 39 public AboutDialog() { } 40 41 42 47 public Container getPanel() 48 { 49 if (this.panel == null) 50 { 51 this.createPanel(); 52 } 53 return this.panel; 54 } 55 56 57 62 public String getTitle() 63 { 64 return resources.getString("about.dialog.title"); 65 } 66 67 68 69 protected void createPanel() 70 { 71 this.panel = new JPanel (new BorderLayout ()); 72 73 this.panel.add("North", new JLabel (new ImageIcon (getClass().getResource("/images/logo.png")))); 75 76 this.panel.add("Center", new JLabel (" ")); 78 79 JPanel info = new JPanel (new GridLayout (3, 1)); 81 82 JLabel java = new JLabel ( 83 resources.getString("about.dialog.text.javaVersion") 84 + " : " 85 + System.getProperty("java.version"), SwingConstants.LEADING); 86 java.setForeground(Color.black); 87 info.add(java); 88 89 JLabel vm = new JLabel ( 90 resources.getString("about.dialog.text.virtualMachine") 91 + " : " 92 + System.getProperty("java.vm.name") 93 + ", " 94 + System.getProperty("java.vm.version"), SwingConstants.LEADING); 95 vm.setForeground(Color.black); 96 info.add(vm); 97 98 JLabel laf = new JLabel ( 99 resources.getString("about.dialog.text.lookAndFeel") 100 + " : " 101 + UIManager.getLookAndFeel().getName(), SwingConstants.LEADING); 102 vm.setForeground(Color.black); 103 info.add(laf); 104 this.panel.add("South", info); 105 } 106 } 107 108 | Popular Tags |