AboutBox in XCode
December 24, 2007 · Programming
aboutLabel = new JLabel[labelCount];
aboutLabel[0] = new JLabel("");
aboutLabel[1] = new JLabel(resbundle.getString("frameConstructor"));
aboutLabel[1].setFont(titleFont);
aboutLabel[2] = new JLabel(resbundle.getString("appVersion"));
aboutLabel[2].setFont(bodyFont);
aboutLabel[3] = new JLabel("");
aboutLabel[4] = new JLabel("");
aboutLabel[5] = new JLabel("JDK " + System.getProperty("java.version"));
aboutLabel[5].setFont(bodyFont);
aboutLabel[6] = new JLabel(resbundle.getString("copyright"));
aboutLabel[6].setFont(bodyFont);
aboutLabel[7] = new JLabel("");
Panel textPanel2 = new Panel(new GridLayout(labelCount, 1));
for (int i = 0; i<labelCount; i++) {
aboutLabel[i].setHorizontalAlignment(JLabel.CENTER);
textPanel2.add(aboutLabel[i]);
}
This is not the first time i see in Apple's products weird ways of implementing things (see Configurations/Misunderstood), but i must say, that it never sees to amaze me.