[Japi-cvs] SF.net SVN: japi: [291] libs/swing-about/trunk/src/net/sf/japi/swing/about/ AboutDialog.
Status: Beta
Brought to you by:
christianhujer
From: <chr...@us...> - 2007-01-14 17:12:42
|
Revision: 291 http://svn.sourceforge.net/japi/?rev=291&view=rev Author: christianhujer Date: 2007-01-14 09:12:37 -0800 (Sun, 14 Jan 2007) Log Message: ----------- Hide license tab if there are no configured licenses. Don't crash when there are no configured licenses. Modified Paths: -------------- libs/swing-about/trunk/src/net/sf/japi/swing/about/AboutDialog.java Modified: libs/swing-about/trunk/src/net/sf/japi/swing/about/AboutDialog.java =================================================================== --- libs/swing-about/trunk/src/net/sf/japi/swing/about/AboutDialog.java 2007-01-14 13:46:23 UTC (rev 290) +++ libs/swing-about/trunk/src/net/sf/japi/swing/about/AboutDialog.java 2007-01-14 17:12:37 UTC (rev 291) @@ -129,7 +129,9 @@ } add(tabs); addTab(buildAboutTab()); - addTab(licensePane); + if (licensePane.getComponentCount() > 0) { + addTab(licensePane); + } addTab(buildRuntimePropertiesTab()); // TODO: Change this to use another way of configuration if (actionFactoryName.equals("daieditor")) { @@ -143,7 +145,9 @@ */ public void showAboutDialog(final Component parent) { tabs.setSelectedIndex(0); - licensePane.setSelectedIndex(0); + if (licensePane.getComponentCount() > 0) { + licensePane.setSelectedIndex(0); + } JOptionPane.showMessageDialog(parent, this, ACTION_FACTORY.format("about.title", actionFactory.getString("application.name")), JOptionPane.PLAIN_MESSAGE); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |