You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by mm...@apache.org on 2004/10/25 20:27:15 UTC

svn commit: rev 55526 - incubator/beehive/trunk/samples/PetStoreDashboard/src/ui

Author: mmerz
Date: Mon Oct 25 11:27:15 2004
New Revision: 55526

Modified:
   incubator/beehive/trunk/samples/PetStoreDashboard/src/ui/PetStoreProductView.java
Log:
Fixed minor UI issues.

Contributor: Daryoush Mehrtash


Modified: incubator/beehive/trunk/samples/PetStoreDashboard/src/ui/PetStoreProductView.java
==============================================================================
--- incubator/beehive/trunk/samples/PetStoreDashboard/src/ui/PetStoreProductView.java	(original)
+++ incubator/beehive/trunk/samples/PetStoreDashboard/src/ui/PetStoreProductView.java	Mon Oct 25 11:27:15 2004
@@ -165,11 +165,18 @@
                         + info.getProduct().getName());
                 currentProductItemView.setProductItem(info.getProduct());
 
-            } else {
+            } else if (StoreInfo.class.isInstance(nodeInfo)) {
+                
+                JOptionPane.showMessageDialog(this, "TBD... Get store information.", "TBD",
+                        JOptionPane.INFORMATION_MESSAGE);               
+           } else {
                 System.out.println("Unknown node type!");
             }
         } catch (RemoteException e) {
-            JOptionPane.showMessageDialog(this, e.getCause().getMessage(), "Exception",
+            String message;
+            if(null != e.getCause()) message = e.getCause().getMessage();
+            else message = e.getMessage();
+            JOptionPane.showMessageDialog(this,message, "Exception",
                     JOptionPane.ERROR_MESSAGE);
 
             e.printStackTrace();
@@ -226,7 +233,6 @@
             add(scrollPane);
             Dimension minimumSize = new Dimension(100, 50);
             scrollPane.setMinimumSize(minimumSize);
-            setVisible(false);
 
         }
 
@@ -236,9 +242,11 @@
                 productIcon.setIcon(getImageIcon(product.getAttachedImage()));
                 productName.setText(product.getName());
                 table.setModel(new ProductDetailModel(product));
-                setVisible(true);
-            } catch (RemoteException e) {
-                JOptionPane.showMessageDialog(this, e.getCause().getMessage(),
+             } catch (RemoteException e) {
+                String message;
+                if(null != e.getCause()) message = e.getCause().getMessage();
+                else message = e.getMessage();
+                JOptionPane.showMessageDialog(this, message,
                         "Exception", JOptionPane.ERROR_MESSAGE);
                 e.printStackTrace();
             }