1 18 package sync4j.syncclient.ipod.panels; 19 20 import java.awt.Color ; 21 import java.awt.event.ActionEvent ; 22 import java.awt.event.ActionListener ; 23 24 import javax.swing.JDialog ; 25 import javax.swing.JPanel ; 26 import javax.swing.JButton ; 27 import javax.swing.JLabel ; 28 import javax.swing.UIManager ; 29 import javax.swing.ImageIcon ; 30 import javax.swing.SwingConstants ; 31 32 import sync4j.syncclient.ipod.utils.*; 33 import sync4j.syncclient.ipod.MainWindow; 34 35 41 public class AboutPanel extends JDialog implements ActionListener , Constants { 42 43 private MainWindow mainWindow; 45 private JButton jbClose; 46 private JLabel jLabel1 ; 47 private JLabel jLabel2 ; 48 private JLabel jLabel3 ; 49 private JLabel jLabel4 ; 50 private JPanel jPanel1 ; 51 52 54 55 public AboutPanel(MainWindow mainWindow, boolean modal) { 56 super(mainWindow, modal); 57 this.mainWindow = mainWindow; 58 initComponents(); 59 } 60 61 64 private void initComponents() { 65 66 int xlab = 47 ; 67 int wlab = 175; 68 int hlab = 18 ; 69 70 jPanel1 = new JPanel () ; 71 jLabel1 = new JLabel () ; 72 jLabel2 = new JLabel () ; 73 jLabel3 = new JLabel () ; 74 jLabel4 = new JLabel () ; 75 jbClose = new JButton (); 76 77 try { 78 UIManager.setLookAndFeel(Constants.lookAndFeel); 79 } catch(Exception e) { 80 e.printStackTrace(); 81 } 82 83 getContentPane().setLayout(null); 87 88 setTitle(Language.getMessage(Language.LABEL_TITLE_ABOUT)); 89 setBackground(Color.WHITE); 90 setForeground(Color.WHITE); 91 setFont(font); 92 setName("aboutDialog"); 93 setResizable(false); 94 setSize(270,299); 95 setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); 96 setLocationRelativeTo(null); 97 98 jPanel1.setLayout(null); 99 jPanel1.setBackground(Color.WHITE); 100 jPanel1.setForeground(Color.WHITE); 101 jPanel1.setBounds(0, 0, 270, 299); 102 getContentPane().add(jPanel1); 103 104 JLabel lab = new JLabel (new ImageIcon (FRAME_LOGONAME)); 105 lab.setBounds(xlab,25,wlab,67); 106 jPanel1.add(lab); 107 108 jLabel1.setBackground(Color.WHITE); 109 jLabel1.setFont(font); 110 jLabel1.setHorizontalAlignment(SwingConstants.CENTER); 111 jLabel1.setText(Language.getMessage(Language.LABEL_ABOUT_IPOD_VERSION)); 112 jLabel1.setBounds(xlab, 93, wlab, hlab); 113 jPanel1.add(jLabel1); 114 115 jLabel2.setBackground(Color.WHITE); 116 jLabel2.setFont(font); 117 jLabel2.setHorizontalAlignment(SwingConstants.CENTER); 118 jLabel2.setText(Language.getMessage(Language.LABEL_ABOUT_COPYRIGHT)); 119 jLabel2.setBounds(xlab, 122, wlab, hlab); 120 jPanel1.add(jLabel2); 121 122 jLabel3.setBackground(Color.WHITE); 123 jLabel3.setFont(font); 124 jLabel3.setHorizontalAlignment(SwingConstants.CENTER); 125 jLabel3.setText(Language.getMessage(Language.LABEL_ABOUT_RIGHTS)); 126 jLabel3.setBounds(xlab, 160, wlab, hlab); 127 jPanel1.add(jLabel3); 128 129 jLabel4.setBackground(Color.WHITE); 130 jLabel4.setFont(font); 131 jLabel4.setHorizontalAlignment(SwingConstants.CENTER); 132 jLabel4.setText(Language.getMessage(Language.LABEL_ABOUT_LINK)); 133 jLabel4.setBounds(xlab, 190, wlab, hlab); 134 jPanel1.add(jLabel4); 135 136 jbClose.setBackground(Color.WHITE); 137 jbClose.setFont(font); 138 jbClose.setText(Language.getMessage(Language.BT_CLOSE)); 139 jbClose.setBounds(91, 230, 88, 24); 140 jbClose.addActionListener(this); 141 jPanel1.add(jbClose); 142 143 } 144 145 public void actionPerformed(ActionEvent evt) { 146 removeAll(); 147 setVisible(false); 148 } 149 } 150 | Popular Tags |