Minor Set default text to the first hint if text field is empty and user is focused on other field

This commit is contained in:
Valentina Kiryushkina
2016-07-26 18:52:59 +03:00
parent 5c5db80715
commit d125d0f59f
@@ -50,6 +50,14 @@ public class CCCreateAnswerPlaceholderPanel {
myHintTextArea.setText("");
}
}
@Override
public void focusLost(FocusEvent e) {
if (myShownHintNumber == 0 && myHintTextArea.getText().isEmpty()) {
myHintTextArea.setForeground(UIUtil.getInactiveTextColor());
myHintTextArea.setText(ourFirstHintText);
}
}
});
myPlaceholderTextArea.grabFocus();