Java Reference
In-Depth Information
L
ISTING
13.4
Continued
* Chapter 13 -
*
* @author Mauro Marinilli
* @version 1.0
*/
public class AboutDialog extends JDialog {
JButton closeButton = new JButton();
JNLPLabel homepageLink = new JNLPLabel();
AboutTable aboutTable;
private final static String DEFAULT_APP_NAME = “Textuale 1.0”;
private final static String PARTS_PROP = “application.parts”;
private final static String PARTS_DESC = “application.parts.desc”;
private final static String REFERENCE_URL = “http://www.marinilli.com”;
/**
* constructor
*/
public AboutDialog(Frame frame) {
super(frame, “Info”, true);
//initializes the about table
aboutTable =
new AboutTable(getItems(
System.getProperties().getProperty(PARTS_PROP)),
getItems(
System.getProperties().getProperty(PARTS_DESC)) );
13
//GUI initialization
JPanel mainPanel = new JPanel();
JPanel centerPanel = new JPanel();
JPanel southPanel = new JPanel();
homepageLink.setURL(REFERENCE_URL);
homepageLink.setText(REFERENCE_URL);
JPanel p = new JPanel();
p.add(homepageLink);
JLabel titleLabel = new JLabel(“<html><body><font size=\”+3\”><b>”+
System.getProperties().getProperty(“app.name”, DEFAULT_APP_NAME));
JLabel subTitleLabel1 = new JLabel(“<html><body><font size=\”+1\”>©
2001 (M) Inc.”);
JLabel subTitleLabel2 = new JLabel(“<html><body><font size=\”-1\”>”+
“Java “+
System.getProperties().getProperty(“java.version”)+” on “+
System.getProperties().getProperty(“os.name”));