Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/399.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Group.layout()是否不在修改后的组中显示新添加的字段?(SWT新手!)_Java_User Interface_Layout_Swt_Redraw - Fatal编程技术网

Java Group.layout()是否不在修改后的组中显示新添加的字段?(SWT新手!)

Java Group.layout()是否不在修改后的组中显示新添加的字段?(SWT新手!),java,user-interface,layout,swt,redraw,Java,User Interface,Layout,Swt,Redraw,我是SWT开发新手,正在尝试构建一个非常简单的GUI窗口(参考在线教程和示例)。我的小GUI获取一个字符串并对其进行解析(使用解析库),然后在组中的字段中显示解析后的数据 到目前为止,它只工作一次。我输入一个字符串,点击“Parse It”,字符串被正确解析,相应的数据字段显示在输入文本框和按钮下面的分组中。我有一个“全部清除”按钮,用于清除这些字段。如果我再次点击“Parse It”,解析逻辑会执行(从控制台输出中可以明显看出),但UI不会显示字段。(到目前为止,我只实现了固定宽度单选选项,直

我是SWT开发新手,正在尝试构建一个非常简单的GUI窗口(参考在线教程和示例)。我的小GUI获取一个字符串并对其进行解析(使用解析库),然后在组中的字段中显示解析后的数据

到目前为止,它只工作一次。我输入一个字符串,点击“Parse It”,字符串被正确解析,相应的数据字段显示在输入文本框和按钮下面的分组中。我有一个“全部清除”按钮,用于清除这些字段。如果我再次点击“Parse It”,解析逻辑会执行(从控制台输出中可以明显看出),但UI不会显示字段。(到目前为止,我只实现了固定宽度单选选项,直到我解决了这个问题)

我对这种行为感到困惑。我尝试过多种方法,比如将组重新创建代码放在清除按钮的鼠标中,而不是只处理组。我已经尝试将组的重新创建放在parse it按钮操作代码中。(我还试着为每个类创建MouseListener的子类,必要时传递引用,但为了简单起见,我刚刚将所有内容放回了一个anon内部类)

我使用group.layout()而不是重画。这个SWT新手缺少什么?这肯定是非常简单的事情。MTIA!(如果代码凌乱,我表示歉意-我经常使用它。)

代码:

package com.mycompany.common.utility.messageparser.ui;
导入java.beans.PropertyDescriptor;
导入java.io.Serializable;
导入java.lang.reflect.InvocationTargetException;
导入java.lang.reflect.Method;
导入java.text.simpleDataFormat;
导入java.util.*;
导入org.apache.commons.beanutils.PropertyUtils;
导入org.eclipse.swt.widgets.*;
导入org.eclipse.swt.swt;
导入org.eclipse.swt.layout.*;
导入org.eclipse.swt.events.*;
导入com.mycompany.common.utility.MessageDefinitionFactory;
导入com.mycompany.common.utility.FixedWidthMessageParseRuty;
导入com.mycompany.messageutils.*;
公共类主窗口
{
私有静态文本信息输入;
公共静态显示=空;
公共静态Shell windowShell=null;
公共静态组=空;
公共静态void main(字符串[]args)
{
Display=Display.getDefault();
Shell shlMultiMessageParser=新的Shell();
设置大小(460388);
shlmultimagesparser.setText(“消息解析器实用程序”);
setLayout(newformlayout());
最终复合=新复合(shlmultimagesparser,SWT.NONE);
FormData fd_composite=新FormData();
fd_composite.bottom=新格式附件(0351);
fd_composite.right=新格式附件(0442);
fd_composite.top=新格式附件(0,10);
fd_composite.left=新格式附件(0,10);
setLayoutData(fd_composite);
setLayout(新FormLayout());
组=新组(复合,SWT.无);
FormData fd_group=新FormData();
fd_group.bottom=新格式附件(0331);
fd_group.right=新格式附件(0405);
fd_group.top=新格式附件(0,79);
fd_group.left=新格式附件(0,10);
setLayoutData(fd_组);
setLayout(新的GridLayout(2,false));
按钮btnFixedWidth=新按钮(复合、SWT.RADIO);
FormData fd_btnFixedWidth=新FormData();
setLayoutData(fd_btnFixedWidth);
btnFixedWidth.setText(“固定宽度”);
按钮btnDelimited=新按钮(复合、SWT.收音机);
fd_btnFixedWidth.top=新格式附件(btnDelimited,0,SWT.top);
fd_btnFixedWidth.left=新格式附件(btnDelimited,23);
FormData fd_btnDelimited=新FormData();
设置布局数据(fd_btnDelimited);
btnDelimited.setText(“DELIM”);
按钮btnGeneric=新按钮(复合,SWT.收音机);
fd_btnDelimited.left=新格式附件(btnGeneric,17);
btnGeneric.setText(“通用”);
setLayoutData(新FormData());
messageInput=新文本(复合,SWT.BORDER);
messageInput.setSize(128,12);
FormData fd_messageInput=new FormData();
fd_messageInput.top=新格式附件(0,40);
fd_messageInput.left=新格式附件(0,10);
messageInput.setLayoutData(fd_messageInput);
按钮btnParseIt=新按钮(复合,SWT.NONE);
fd_messageInput.right=新格式附件(btnParseIt,-6);
FormData fd_btnParseIt=新FormData();
fd_btnParseIt.top=新格式附件(0,38);
fd_btnParseIt.right=新格式附件(100,-29);
fd_btnParseIt.left=新格式附件(0335);
setLayoutData(fd_btnParseIt);
setText(“解析它”);
//btnParseIt.addMouseListener(新的ParseItButtonAction(messageInput,
//集团、btnFixedWidth、btnDelimited、btnGeneric);
//解析它按钮动作
addMouseListener(新的MouseListener()
{
公共无效mouseUp(MouseEvent arg0)
{
字符串messageString=messageInput.getText();
if(null==messageString | | messageString.isEmpty())
返回;
//解析消息并构建表单!
字符串messageId=messageString.substring(0,3);
MessageDefinition MessageDefinition=null;
尝试
{
//将需要从单选按钮中拉出类型
messageDefinition=(messageDefinition)(MessageDefinitionFactory.getMessageDefinition(“FixedWidth”,messageId)).newInstance();
}
捕获(异常e2)
package com.mycompany.common.utility.messageparser.ui;

import java.beans.PropertyDescriptor;
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.*;
import org.apache.commons.beanutils.PropertyUtils;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.events.*;

import com.mycompany.common.utility.MessageDefinitionFactory;
import com.mycompany.common.utility.FixedWidthMessageParserUtility;
import com.mycompany.messageutils.*;

public class MainWindow
{
    private static Text   messageInput;
    public static Display display              = null;
    public static Shell   windowShell          = null;
    public static Group   group                = null;

    public static void main(String[] args)
    {
        Display display = Display.getDefault();
        Shell shlMultiMessageParser= new Shell();
        shlMultiMessageParser.setSize(460, 388);
        shlMultiMessageParser.setText("Message Parser Utility");
        shlMultiMessageParser.setLayout(new FormLayout());

        final Composite composite = new Composite(shlMultiMessageParser, SWT.NONE);
        FormData fd_composite = new FormData();
        fd_composite.bottom = new FormAttachment(0, 351);
        fd_composite.right = new FormAttachment(0, 442);
        fd_composite.top = new FormAttachment(0, 10);
        fd_composite.left = new FormAttachment(0, 10);
        composite.setLayoutData(fd_composite);
        composite.setLayout(new FormLayout());

        group = new Group(composite, SWT.NONE);
        FormData fd_group = new FormData();
        fd_group.bottom = new FormAttachment(0, 331);
        fd_group.right = new FormAttachment(0, 405);
        fd_group.top = new FormAttachment(0, 79);
        fd_group.left = new FormAttachment(0, 10);
        group.setLayoutData(fd_group);
        group.setLayout(new GridLayout(2, false));

        Button btnFixedWidth= new Button(composite, SWT.RADIO);
        FormData fd_btnFixedWidth= new FormData();
        btnFixedWidth.setLayoutData(fd_btnFixedWidth);
        btnFixedWidth.setText("FixedWidth");

        Button btnDelimited = new Button(composite, SWT.RADIO);
        fd_btnFixedWidth.top = new FormAttachment(btnDelimited, 0, SWT.TOP);
        fd_btnFixedWidth.left = new FormAttachment(btnDelimited, 23);
        FormData fd_btnDelimited = new FormData();
        btnDelimited.setLayoutData(fd_btnDelimited);
        btnDelimited.setText("DELIM");

        Button btnGeneric = new Button(composite, SWT.RADIO);
        fd_btnDelimited.left = new FormAttachment(btnGeneric, 17);
        btnGeneric.setText("GENERIC");
        btnGeneric.setLayoutData(new FormData());

        messageInput = new Text(composite, SWT.BORDER);
        messageInput.setSize(128, 12);
        FormData fd_messageInput = new FormData();
        fd_messageInput.top = new FormAttachment(0, 40);
        fd_messageInput.left = new FormAttachment(0, 10);
        messageInput.setLayoutData(fd_messageInput);

        Button btnParseIt = new Button(composite, SWT.NONE);
        fd_messageInput.right = new FormAttachment(btnParseIt, -6);
        FormData fd_btnParseIt = new FormData();
        fd_btnParseIt.top = new FormAttachment(0, 38);
        fd_btnParseIt.right = new FormAttachment(100, -29);
        fd_btnParseIt.left = new FormAttachment(0, 335);
        btnParseIt.setLayoutData(fd_btnParseIt);
        btnParseIt.setText("Parse it");
        // btnParseIt.addMouseListener (new ParseItButtonAction(messageInput,
        // group, btnFixedWidth, btnDelimited, btnGeneric));
        // PARSE IT BUTTON ACTION
        btnParseIt.addMouseListener(new MouseListener()
        {
            public void mouseUp(MouseEvent arg0)
            {
                String messageString = messageInput.getText();
                if (null == messageString || messageString.isEmpty())
                    return;

                // PARSE THE MESSAGE AND BUILD THE FORM!
                String messageId = messageString.substring(0, 3);
                MessageDefinition messageDefinition = null;
                try
                {
                    // Will need to pull the type from the radio buttons
                    messageDefinition = (MessageDefinition) (MessageDefinitionFactory.getMessageDefinition("FixedWidth", messageId)).newInstance();
                }
                catch (Exception e2)
                {
                    System.out.println("CAUGHT " + e2.getClass().getName() + ": " + e2.getMessage());
                    e2.printStackTrace();
                }
                ArrayList<FieldDefinition> fields = messageDefinition.getFields();
                Object messageBean = null;
                // List of ALL the name value pairs to be displayed.
                List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();

                try
                {
                    messageBean = MessageHelper.getObjectFromDefinition(messageString, messageDefinition, ClientMessageType.FixedWidth);
                    /**
                     * Get the properties of the bean and display their names
                     * and values
                     */
                    nameValuePairs = getNameValuePairs(messageBean, fields, nameValuePairs);
                    for (NameValuePair nameValuePair : nameValuePairs)
                    {
                        Label lblNewLabel = new Label(group, SWT.NONE);
                        lblNewLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
                        lblNewLabel.setText(nameValuePair.name);

                        Text textField = new Text(group, SWT.BORDER);
                        textField.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
                        textField.setText(nameValuePair.value);

                    }
                    /**
                     * End iterate thru bean properties
                     */
                    group.layout(true);
                    //windowShell.layout(true);
                }
                catch (MessageParsingException e1)
                {
                    System.out.println("CAUGHT " + e1.getClass().getName() + ": " + e1.getMessage());
                    e1.printStackTrace();
                }

            }

            @Override
            public void mouseDown(MouseEvent arg0)
            {
            }

            @Override
            public void mouseDoubleClick(MouseEvent arg0)
            {
            }

            public List getNameValuePairs(Object messageBean, List<FieldDefinition> fields, List<NameValuePair> list)
            {
                Object property = null;
                if (fields == null)
                {
                    Method[] objectMethods = messageBean.getClass().getDeclaredMethods();
                    String fieldName = "";
                    Object fieldValue = null;
                    for (Method thisMethod : objectMethods)
                    {
                        if (thisMethod.getName().contains("get"))
                        {
                            fieldName = thisMethod.getName().substring(3, thisMethod.getName().length());
                            System.out.println("ATTEMPTING TO INVOKE get" + fieldName + "() on " + messageBean.getClass().getName());
                            try
                            {
                                fieldValue = thisMethod.invoke(messageBean);
                            }
                            catch (Exception e)
                            {
                                System.out.println("CAUGHT TRYING TO GET " + fieldName + " From " + messageBean.getClass().getName() + "::" + e.getClass().getName() + ": " + e.getMessage());
                                e.printStackTrace();
                            }
                            list.add(new NameValuePair(fieldName, String.valueOf(fieldValue)));
                        }
                    }
                }
                else
                {
                    for (FieldDefinition f : fields)
                    {
                        try
                        {
                            property = PropertyUtils.getProperty(messageBean, f.getPropertyName());
                        }
                        catch (Exception e)
                        {
                            System.out.println("CAUGHT " + e.getClass().getName() + ": " + e.getMessage());
                            e.printStackTrace();
                        }
                        if (property instanceof java.lang.String)
                        {
                            list.add(new NameValuePair(f.getPropertyName(), (String) property));
                        }
                        else if (property instanceof java.util.GregorianCalendar)
                        {
                            java.util.GregorianCalendar date = (java.util.GregorianCalendar) property;
                            Calendar cal = date;
                            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd hh:mm:ss");
                            String value = dateFormat.format(cal.getTime());
                            list.add(new NameValuePair(f.getPropertyName(), value));
                        }
                        else if (property instanceof java.util.List)
                        {

                            for (Object thePropertyObject : (List) property)
                            {
                                System.out.println("Class type of property is " + thePropertyObject.getClass().getName());
                                list = getNameValuePairs(thePropertyObject, null, list);
                            }
                        }
                        else
                        // could be Integer or Long.
                        {
                            list.add(new NameValuePair(f.getPropertyName(), String.valueOf(property)));
                        }
                    }
                } // END else fields not null
                return list;
            }

        }); // END OF PARSE IT BUTTON MOUSE LISTENER

        // CLEAR ALL BUTTON
        Button btnClearAll = new Button(composite, SWT.NONE);
        btnClearAll.addMouseListener(new MouseListener()
        {

            @Override
            public void mouseUp(MouseEvent arg0)
            {
                System.out.println("CLEAR ALL MOUSE UP");
                if ((group != null) && (! group.isDisposed()))
                {
                    group.dispose();
                }
                // REFRESH THE GROUP
                group = new Group(composite, SWT.NONE);
                FormData fd_group = new FormData();
                fd_group.bottom = new FormAttachment(0, 331);
                fd_group.right = new FormAttachment(0, 405);
                fd_group.top = new FormAttachment(0, 79);
                fd_group.left = new FormAttachment(0, 10);
                group.setLayoutData(fd_group);
                group.setLayout(new GridLayout(2, false));
                group.layout(true);            }

            @Override
            public void mouseDown(MouseEvent arg0)
            {
                // TODO Auto-generated method stub

            }

            @Override
            public void mouseDoubleClick(MouseEvent arg0)
            {
                // TODO Auto-generated method stub

            }
        });

        Label lblNewLabel = new Label(composite, SWT.NONE);
        FormData fd_lblNewLabel = new FormData();
        fd_lblNewLabel.right = new FormAttachment(0, 167);
        fd_lblNewLabel.top = new FormAttachment(0, 20);
        fd_lblNewLabel.left = new FormAttachment(0, 10);
        lblNewLabel.setLayoutData(fd_lblNewLabel);
        lblNewLabel.setText("Paste message below:");

        btnClearAll.setToolTipText("Click here to clear ALL fields.");
        btnClearAll.setText("Clear All");
        FormData fd_btnClearAll = new FormData();
        fd_btnClearAll.right = new FormAttachment(btnParseIt, 68);
        fd_btnClearAll.bottom = new FormAttachment(lblNewLabel, 0, SWT.BOTTOM);
        fd_btnClearAll.left = new FormAttachment(btnParseIt, 0, SWT.LEFT);
        btnClearAll.setLayoutData(fd_btnClearAll);

        shlMultiMessageParser.open();
        shlMultiMessageParser.layout();
        while (!shlMultiMessageParser.isDisposed())
        {
            if (!display.readAndDispatch())
            {
                display.sleep();
            }
        }
    }

}

class NameValuePair
{
    public String name  = "";
    public String value = "";

    public NameValuePair(String name, String value)
    {
        this.name = name;
        this.value = value;
    }
}

class ClearAllButtonAction extends MouseAdapter
{
    Group     group     = null;
    Composite composite = null;

    public ClearAllButtonAction(Group group, Composite composite)
    {
        System.out.println("CLEAR ALL BUTTON CTOR");
        this.group = group;
        this.composite = composite;
    }

    public void mouseUp(MouseEvent e)
    {
        System.out.println("CLEAR ALL MOUSE UP");
        group.dispose();
        /*
         * group = new Group(composite, SWT.NONE); FormData fd_group = new
         * FormData(); fd_group.bottom = new FormAttachment(0, 331);
         * fd_group.right = new FormAttachment(0, 405); fd_group.top = new
         * FormAttachment(0, 79); fd_group.left = new FormAttachment(0, 10);
         * group.setLayoutData(fd_group); group.setLayout(new GridLayout(2,
         * false)); group.layout(true);
         */}
}

class ParseItButtonAction extends MouseAdapter
{
    private Text  messageInput = null;
    private Group group        = null;
    private Button btnFixedWidth = null, btnDELIM = null;

    public ParseItButtonAction(Text messageInput, Group group, Button btnFixedWidth, Button btnDELIM, Button btnGeneric)
    {
        this.messageInput = messageInput;
        this.group = group;
        this.btnFixedWidth = btnFixedWidth;
        this.btnDELIM = btnDELIM;
    }

    public void mouseUp(MouseEvent e)
    {
        // PARSE THE MESSAGE AND BUILD THE FORM!
        String messageString = messageInput.getText();
        String messageId = messageString.substring(0, 3);
        MessageDefinition messageDefinition = null;
        try
        {
            // Will need to pull the type from the radio buttons
            messageDefinition = (MessageDefinition) (MessageDefinitionFactory.getMessageDefinition("FixedWidth", messageId)).newInstance();
        }
        catch (Exception e2)
        {
            System.out.println("CAUGHT " + e2.getClass().getName() + ": " + e2.getMessage());
            e2.printStackTrace();
        }
        ArrayList<FieldDefinition> fields = messageDefinition.getFields();
        // If this were DELIM, it would be handling a BaseMessageBean type.
        Object messageBean = null;
        // List of ALL the name value pairs to be displayed.
        List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();

        try
        {
            messageBean = MessageHelper.getObjectFromDefinition(messageString, messageDefinition, ClientMessageType.FixedWidth);
            /**
             * Get the properties of the bean and display their names and values
             */
            nameValuePairs = getNameValuePairs(messageBean, fields, nameValuePairs);
            for (NameValuePair nameValuePair : nameValuePairs)
            {
                Label lblNewLabel = new Label(group, SWT.NONE);
                lblNewLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
                lblNewLabel.setText(nameValuePair.name);

                Text textField = new Text(group, SWT.BORDER);
                textField.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
                textField.setText(nameValuePair.value);

            }
            /**
             * End iterate thru bean properties
             */
            group.layout();
        }
        catch (MessageParsingException e1)
        {
            System.out.println("CAUGHT " + e1.getClass().getName() + ": " + e1.getMessage());
            e1.printStackTrace();
        }

    }

    // The Object type should be converted into a type of messageBean superclass
    public List getNameValuePairs(Object messageBean, List<FieldDefinition> fields, List<NameValuePair> list)
    {
        Object property = null;
        // BECAUSE FixedWidth/GENERIC DO NOT SPECIFY TYPES FOR MESSAGE SUBSECTIONS
        if (fields == null)
        {
            Method[] objectMethods = messageBean.getClass().getDeclaredMethods();
            String fieldName = "";
            Object fieldValue = null;
            for (Method thisMethod : objectMethods)
            {
                if (thisMethod.getName().contains("get"))
                {
                    fieldName = thisMethod.getName().substring(3, thisMethod.getName().length());
                    System.out.println("ATTEMPTING TO INVOKE get" + fieldName + "() on " + messageBean.getClass().getName());
                    try
                    {
                        fieldValue = thisMethod.invoke(messageBean);
                    }
                    catch (IllegalArgumentException e)
                    {
                        System.out.println("CAUGHT TRYING TO GET " + fieldName + " From " + messageBean.getClass().getName() + "::" + e.getClass().getName() + ": " + e.getMessage());
                        e.printStackTrace();
                    }
                    catch (IllegalAccessException e)
                    {
                        System.out.println("CAUGHT TRYING TO GET " + fieldName + " From " + messageBean.getClass().getName() + "::" + e.getClass().getName() + ": " + e.getMessage());
                        e.printStackTrace();
                    }
                    catch (InvocationTargetException e)
                    {
                        System.out.println("CAUGHT TRYING TO GET " + fieldName + " From " + messageBean.getClass().getName() + "::" + e.getClass().getName() + ": " + e.getMessage());
                        e.printStackTrace();
                    }
                    list.add(new NameValuePair(fieldName, String.valueOf(fieldValue)));
                }
            }
        }
        else
        {
            for (FieldDefinition f : fields)
            {
                try
                {
                    property = PropertyUtils.getProperty(messageBean, f.getPropertyName());
                }
                catch (Exception e)
                {
                    System.out.println("CAUGHT " + e.getClass().getName() + ": " + e.getMessage());
                    e.printStackTrace();
                }
                if (property instanceof java.lang.String)
                {
                    list.add(new NameValuePair(f.getPropertyName(), (String) property));
                }
                else if (property instanceof java.util.GregorianCalendar)
                {
                    java.util.GregorianCalendar date = (java.util.GregorianCalendar) property;
                    Calendar cal = date;
                    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd hh:mm:ss");
                    String value = dateFormat.format(cal.getTime());
                    list.add(new NameValuePair(f.getPropertyName(), value));
                }
                else if (property instanceof java.util.List)
                {

                    for (Object thePropertyObject : (List) property)
                    {
                        System.out.println("Class type of property is " + thePropertyObject.getClass().getName());
                        // Need to use the factory to get the message bean type
                        // for the subsections, but cannot
                        // DO THIS for SUBSECTIONS FOR FixedWidth/GENERIC, ONLY DELIM.
                        // ARGH.
                        // Add these types to the message factory, then do the
                        // lookup. for now just print the types.
                        list = getNameValuePairs(thePropertyObject, null, list);
                    }
                }
                else
                // could be Integer or Long.
                {
                    list.add(new NameValuePair(f.getPropertyName(), String.valueOf(property)));
                }
            }
        } // END else fields not null
        return list;
    }
}
            if ((group != null) && (! group.isDisposed()))
            {
                for (Control childWidget: group.getChildren())
                {
                    childWidget.dispose();
                }
            }
            messageInput.setText("");