[RFC][IcedTea-Web]: Moved creation of swing thread.
Omair Majid
omajid at redhat.com
Thu Dec 23 12:32:09 PST 2010
On 12/23/2010 02:58 PM, Andrew Su wrote:
> There was some miscommunication about this before, this updated patch
> will make it work as intended and not need to create extra threads.
>
Please see my comments below.
>
> diff -r 70e445bbe85a netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsDialog.java
> --- a/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsDialog.java Wed Dec 22 17:14:44 2010 -0500
> +++ b/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsDialog.java Thu Dec 23 14:56:42 2010 -0500
> @@ -120,16 +120,11 @@
> */
> public static void showAdvancedProxySettingsDialog(final DeploymentConfiguration config) throws Exception {
Is there a reason this method throws an exception?
> setSystemLookAndFeel();
Can you please remove this? I dont think this is doing anything.
> - SwingUtilities.invokeLater(new Runnable() {
> - @Override
> - public void run() {
> - AdvancedProxySettingsDialog psd = new AdvancedProxySettingsDialog(config);
> - psd.setResizable(false);
> - psd.centerDialog();
> - psd.setVisible(true);
> - psd.dispose();
> - }
> - });
> + AdvancedProxySettingsDialog psd = new AdvancedProxySettingsDialog(config);
> + psd.setResizable(false);
> + psd.centerDialog();
> + psd.setVisible(true);
> + psd.dispose();
>
> }
>
This part looks fine to me.
> diff -r 70e445bbe85a netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java
> --- a/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java Wed Dec 22 17:14:44 2010 -0500
> +++ b/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java Thu Dec 23 14:56:42 2010 -0500
> @@ -184,23 +184,15 @@
> JPanel buttonDeleteRestore = new JPanel(new FlowLayout(FlowLayout.TRAILING));
> JButton bViewFiles = new JButton(Translator.R("TIFPViewFiles"));
> bViewFiles.addActionListener(new ActionListener() {
> -
> @Override
> public void actionPerformed(ActionEvent e) {
> - SwingUtilities.invokeLater(new Runnable() {
> - @Override
> - public void run() {
> - try {
> - CacheViewer.showCacheDialog(config);
> - } catch (Exception e1) {
> - // TODO Auto-generated catch block
> - e1.printStackTrace();
> - }
> -
> - }
> - });
> + try {
> + CacheViewer.showCacheDialog(config);
> + } catch (Exception e1) {
> + // TODO Auto-generated catch block
> + e1.printStackTrace();
> + }
> }
If you can change showCacheDialog to avoid throwing exceptions, you wont
need the catch block here. Other than that, this looks good.
Cheers,
Omair
More information about the distro-pkg-dev
mailing list