1 package com.jetbrains.edu.coursecreator.ui;
6 public class CCCreateAnswerPlaceholderPanel extends JPanel {
8 private JPanel myPanel;
9 private JTextArea myHintText;
10 private JTextField myAnswerPlaceholderText;
12 public CCCreateAnswerPlaceholderPanel() {
13 super(new BorderLayout());
14 add(myPanel, BorderLayout.CENTER);
15 myHintText.setLineWrap(true);
16 myHintText.setWrapStyleWord(true);
17 myAnswerPlaceholderText.grabFocus();
20 public void setAnswerPlaceholderText(String answerPlaceholderText) {
21 myAnswerPlaceholderText.setText(answerPlaceholderText);
24 public void setHintText(String hintText) {
25 myHintText.setText(hintText);
28 public String getAnswerPlaceholderText() {
29 return myAnswerPlaceholderText.getText();
32 public String getHintText() {
33 return myHintText.getText();
36 public JComponent getPreferredFocusedComponent() {
37 return myAnswerPlaceholderText;