| 1 | /* |
1 | /* |
| 2 | * @(#)Guiffy application - AboutDialog.java 06-Jun-2000 |
2 | * @(#)Guiffy application - AboutDialog.java 06-Jun-2000 |
| 3 | * |
3 | * |
| 4 | * Copyright (c) 1998 - 2000 Guiffy Software. All Rights Reserved. |
4 | * Copyright (c) 1998 - 2000 Guiffy Software. All Rights Reserved. |
| 5 | * by: Bill W. Ritcher |
5 | * by: Bill W. Ritcher |
| 6 | * |
6 | * |
| 7 | */ |
7 | */ |
| | | |
8> | package com.guiffy.guiffy; |
| | | |
9> | import com.guiffy.guiffy.*; |
| 8 | |
10 | |
| 9 | import javax.swing.*; |
11 | import javax.swing.*; |
| 10 | import javax.swing.event.*; |
12 | import javax.swing.event.*; |
| 11 | import java.io.*; |
13 | import java.io.*; |
| ..... | ( 12 - 22 ) |
.... | ( 12 - 22 ) |
| 23 | */ |
25 | */ |
| 24 | public class AboutDialog extends JDialog { |
26 | public class AboutDialog extends JDialog { |
| 25 | private Frame fr; |
27 | private Frame fr; |
| 26 | private JLabel label1; |
28 | private JLabel label1; |
| 27< | private JLabel label2; |
29> | private JLabel label2a; |
| | | |
30> | private JLabel label2; |
| 28 | private JLabel label3; |
31 | private JLabel label3; |
| 29 | private JLabel label4; |
32 | private JLabel label4; |
| 30 | private JButton okButton; |
33 | private JButton okButton; |
| 31 | |
34 | |
| 32 | /** |
35 | /** |
| 33 | * Creates an AboutDialog |
36 | * Creates an AboutDialog |
| 34 | * @param parent the parent Frame |
37 | * @param parent the parent Frame |
| 35 | * @param modal a boolean parameter for modal dialog behavior |
38 | * @param modal a boolean parameter for modal dialog behavior |
| 36 | */ |
39 | */ |
| 37 | public AboutDialog(Frame parent, boolean modal) { |
40 | public AboutDialog(Frame parent, boolean modal) { |
| 38 | |
41 | |
| 39< | super(parent, ReBu.Grbget("ad_title") + " Guiffy 1.4", modal); |
42> | super(parent, ReBu.Grbget("ad_title") + " Guiffy 1.5", modal); |
| 40 | fr = parent; |
43 | fr = parent; |
| 41 | // Create the dialog components... |
44 | // Create the dialog components... |
| 42 | createComponents(); |
45 | createComponents(); |
| 43 | } |
46 | } |
| 44 | |
47 | |
| 45 | /** |
48 | /** |
| 46 | * Returns the AboutDialog Preferred Size - will be called by the layout. |
49 | * Returns the AboutDialog Preferred Size - will be called by the layout. |
| 47 | * @return the dialog's preferred size |
50 | * @return the dialog's preferred size |
| 48 | */ |
51 | */ |
| 49 | public Dimension getPreferredSize() { |
52 | public Dimension getPreferredSize() { |
| 50< | return new Dimension(357, 228); |
53> | return new Dimension(357, 248); |
| 51 | } |
54 | } |
| 52 | |
55 | |
| 53 | // Create the main display panel... |
56 | // Create the main display panel... |
| 54 | private void createComponents() { |
57 | private void createComponents() { |
| 55 | // INIT_CONTROLS |
58 | // INIT_CONTROLS |
| 56 | getContentPane().setLayout(null); |
59 | getContentPane().setLayout(null); |
| 57 | setVisible(false); |
60 | setVisible(false); |
| 58 | label1 = new JLabel("Guiffy - GUI interface for Jiffy(File Differ)"); |
61 | label1 = new JLabel("Guiffy - GUI interface for Jiffy(File Differ)"); |
| 59 | label1.setBounds(60,30,251,21); |
62 | label1.setBounds(60,30,251,21); |
| 60 | getContentPane().add(label1); |
63 | getContentPane().add(label1); |
| 61< | label2 = new JLabel("by Bill Ritcher, Guiffy Software - Copyright 1998 - 2000"); |
64> | label2a = new JLabel("Created by Bill Ritcher"); |
| 62< | label2.setBounds(10,50,351,21); |
65> | label2a.setBounds(104,50,351,21); |
| | | |
66> | getContentPane().add(label2a); |
| | | |
67> | label2 = new JLabel("Guiffy Software, Inc. - Copyright 1998 - 2000"); |
| | | |
68> | label2.setBounds(50,70,351,21); |
| 63 | getContentPane().add(label2); |
69 | getContentPane().add(label2); |
| 64< | label3 = new JLabel("Guiffy 1.4 - Build 45"); |
70> | label3 = new JLabel("Guiffy 1.5 - Build 46"); |
| 65< | label3.setBounds(110,70,251,21); |
71> | label3.setBounds(110,90,251,21); |
| 66 | getContentPane().add(label3); |
72 | getContentPane().add(label3); |
| 67 | |
73 | |
| 68 | Properties prop = new Properties(System.getProperties() ); |
74 | Properties prop = new Properties(System.getProperties() ); |
| 69 | String Java_Ver = prop.getProperty( "java.version" ); |
75 | String Java_Ver = prop.getProperty( "java.version" ); |
| 70< | // String Java_Ven = prop.getProperty( "java.vendor" ); |
| | |
| 71< | // String Java_Cla = prop.getProperty( "java.class.version" ); |
| | |
| 72< | // String Java_Com = prop.getProperty( "java.compiler" ); |
| | |
| 73 | // String OS_Nam = prop.getProperty( "os.name" ); |
76 | // String OS_Nam = prop.getProperty( "os.name" ); |
| 74 | // String OS_Arc = prop.getProperty( "os.arch" ); |
77 | // String OS_Arc = prop.getProperty( "os.arch" ); |
| 75 | // String OS_Ver = prop.getProperty( "os.version" ); |
78 | // String OS_Ver = prop.getProperty( "os.version" ); |
| 76 | label4 = new JLabel("On JDK/JRE - " + Java_Ver); |
79 | label4 = new JLabel("On JDK/JRE - " + Java_Ver); |
| 77< | label4.setBounds(110,100,251,21); |
80> | label4.setBounds(110,120,251,21); |
| 78 | getContentPane().add(label4); |
81 | getContentPane().add(label4); |
| 79 | |
82 | |
| 80 | okButton = new JButton(); |
83 | okButton = new JButton(); |
| 81 | okButton.setText("OK"); |
84 | okButton.setText("OK"); |
| 82 | Font ButFont = new Font("Monospaced", Font.BOLD, 14); |
85 | Font ButFont = new Font("Monospaced", Font.BOLD, 14); |
| 83 | okButton.setFont(ButFont); |
86 | okButton.setFont(ButFont); |
| 84< | okButton.setBounds(120,150,95,32); |
87> | okButton.setBounds(120,170,95,32); |
| 85 | AboutActionListener actionListener = new AboutActionListener(); |
88 | AboutActionListener actionListener = new AboutActionListener(); |
| 86 | okButton.addActionListener(actionListener); |
89 | okButton.addActionListener(actionListener); |
| 87 | okButton.setActionCommand("OK"); |
90 | okButton.setActionCommand("OK"); |
| 88 | getContentPane().add(okButton); |
91 | getContentPane().add(okButton); |
| ..... | ( 89 - 127 ) |
.... | ( 89 - 127 ) |
| 128 | } |
131 | } |
| 129 | } |
132 | } |
| 130 | } |
133 | } |
| 131 | |
134 | |