1 7 package org.ejtools.jndi.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 class AboutDialog implements AboutService 31 { 32 33 protected JPanel panel = null; 34 35 private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jndi.browser.Resources"); 36 37 38 39 public AboutDialog() { } 40 41 42 47 public Container getPanel() 48 { 49 if (this.panel == null) 51 { 52 this.createPanel(); 53 } 54 return this.panel; 55 } 56 57 58 63 public String getTitle() 64 { 65 return resources.getString("about.dialog.title"); 66 } 67 68 69 70 protected void createPanel() 71 { 72 this.panel = new JPanel (new BorderLayout ()); 73 74 this.panel.add("North", new JLabel (new ImageIcon (getClass().getResource("/images/logo.png")))); 76 77 this.panel.add("Center", new JLabel (" ")); 79 80 JPanel info = new JPanel (new GridLayout (3, 1)); 82 83 JLabel java = new JLabel ( 84 resources.getString("about.dialog.text.javaVersion") 85 + " : " 86 + System.getProperty("java.version"), SwingConstants.LEADING); 87 java.setForeground(Color.black); 88 info.add(java); 89 90 JLabel vm = new JLabel ( 91 resources.getString("about.dialog.text.virtualMachine") 92 + " : " 93 + System.getProperty("java.vm.name") 94 + ", " 95 + System.getProperty("java.vm.version"), SwingConstants.LEADING); 96 vm.setForeground(Color.black); 97 info.add(vm); 98 99 JLabel laf = new JLabel ( 100 resources.getString("about.dialog.text.lookAndFeel") 101 + " : " 102 + UIManager.getLookAndFeel().getName(), SwingConstants.LEADING); 103 vm.setForeground(Color.black); 104 info.add(laf); 105 this.panel.add("South", info); 106 } 107 } 108 | Popular Tags |