Author: channa
Date: Tue Dec  4 00:26:09 2007
New Revision: 10471

Log:

Fixing text field widths (Mashup-406).

Modified:
   
trunk/commons/monitor/modules/client/src/main/java/org/wso2/monitor/ConfigScreen.java

Modified: 
trunk/commons/monitor/modules/client/src/main/java/org/wso2/monitor/ConfigScreen.java
==============================================================================
--- 
trunk/commons/monitor/modules/client/src/main/java/org/wso2/monitor/ConfigScreen.java
       (original)
+++ 
trunk/commons/monitor/modules/client/src/main/java/org/wso2/monitor/ConfigScreen.java
       Tue Dec  4 00:26:09 2007
@@ -43,26 +43,34 @@
         this.jmxClient = jmxClient;
         // Setup frame.
         configFrame = new 
JFrame(monitorProperties.getProperty("monitor.configmon.title"));
-        configFrame.setSize(400, 120);
+        configFrame.setSize(410, 150);
     }
 
     /**
      * Draws the configuration screen and adds the even listener.
      */
     public void showMonitorSettings() {
+        // Setup control sizes.
+        Dimension fieldSize = new Dimension(310, 23);
+        Dimension buttonSize = new Dimension(90, 23);
+
         // Service URL controls.
         JLabel urlLabel = new 
JLabel(monitorProperties.getProperty("monitor.configmon.serviceurl"));
         serviceURLText = new JTextField(jmxClient.getConnectorAddress());
+        serviceURLText.setPreferredSize(fieldSize);
 
         // MBean name controls.
         JLabel beanLabel = new 
JLabel(monitorProperties.getProperty("monitor.configmon.mbeanname"));
         mBeanNameText = new JTextField(jmxClient.getMBeanName());
+        mBeanNameText.setPreferredSize(fieldSize);
 
         // OK, Cancel buttons and status bar.
         final JButton okButton = new JButton(
                 monitorProperties.getProperty("monitor.configmon.ok"));
         final JButton cancelButton = new JButton(
                 monitorProperties.getProperty("monitor.configmon.cancel"));
+        okButton.setPreferredSize(buttonSize);
+        cancelButton.setPreferredSize(buttonSize);
         okButton.addActionListener(this);
         cancelButton.addActionListener(this);
 
@@ -135,7 +143,7 @@
         String mBeanName = mBeanNameText.getText();
 
         // Check if valid data has been entered.
-        if (serviceURL != null && mBeanName != null) {
+        if (!"".equals(serviceURL) && !"".equals(mBeanName)) {
             try {
                 JMXServiceURL validURL = new JMXServiceURL(serviceURL);
 

_______________________________________________
Commons-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/commons-dev

Reply via email to