From 452ef539b985c1cbfaa479088a161a98ba881dfe Mon Sep 17 00:00:00 2001 From: Andrew Su <asu@redhat.com> Date: Tue, 4 Jan 2011 11:23:15 -0500 Subject: Hide unsupported options in itw-settings' security options. --- .../jnlp/controlpanel/SecuritySettingsPanel.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'netx/net/sourceforge/jnlp') diff --git a/netx/net/sourceforge/jnlp/controlpanel/SecuritySettingsPanel.java b/netx/net/sourceforge/jnlp/controlpanel/SecuritySettingsPanel.java index 9727b46..0c76f6e 100644 --- a/netx/net/sourceforge/jnlp/controlpanel/SecuritySettingsPanel.java +++ b/netx/net/sourceforge/jnlp/controlpanel/SecuritySettingsPanel.java @@ -114,16 +114,16 @@ public class SecuritySettingsPanel extends NamedBorderPanel implements ActionLis // Only display the ones with properties that are valid or existent. for (int i = 0; i < properties.length; i++) { - try { - String s = config.getProperty(properties[i]); - securityGeneralOptions[i].setSelected(Boolean.parseBoolean(s)); - securityGeneralOptions[i].setActionCommand(properties[i]); - securityGeneralOptions[i].addActionListener(this); - c.gridy = i + 1; - topPanel.add(securityGeneralOptions[i], c); - } catch (Exception e) { + String s = config.getProperty(properties[i]); + if (s == null) { securityGeneralOptions[i] = null; + continue; } + securityGeneralOptions[i].setSelected(Boolean.parseBoolean(s)); + securityGeneralOptions[i].setActionCommand(properties[i]); + securityGeneralOptions[i].addActionListener(this); + c.gridy = i + 1; + topPanel.add(securityGeneralOptions[i], c); } Component filler = Box.createRigidArea(new Dimension(1, 1)); -- cgit v1.2.3