Remove redundant inheritance from JPanel
authorValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Mon, 25 Jul 2016 16:22:19 +0000 (19:22 +0300)
committerValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Mon, 25 Jul 2016 16:25:34 +0000 (19:25 +0300)
python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCCreateAnswerPlaceholderDialog.java
python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCCreateAnswerPlaceholderPanel.java

index 3ce4e8ecae8feec2e56be9c3af0dba785e4f36e4..db3c0d053eeb3dc56473b65a0593c74ad3e5b598 100644 (file)
@@ -64,7 +64,7 @@ public class CCCreateAnswerPlaceholderDialog extends DialogWrapper {
   @Nullable
   @Override
   protected JComponent createCenterPanel() {
-    return myPanel;
+    return myPanel.getMailPanel();
   }
 
   @Nullable
index c33ab81687e1ec2f43bcdcaa4607f9336043f2c3..f2a479d2fa1b03bd4306ad3491af080d82d8b416 100644 (file)
@@ -17,7 +17,7 @@ import java.awt.event.FocusEvent;
 import java.util.ArrayList;
 import java.util.List;
 
-public class CCCreateAnswerPlaceholderPanel extends JPanel {
+public class CCCreateAnswerPlaceholderPanel {
   private static String ourFirstHintText = "Type here to add hint";
   
   private JPanel myPanel;
@@ -33,9 +33,6 @@ public class CCCreateAnswerPlaceholderPanel extends JPanel {
   }};
 
   public CCCreateAnswerPlaceholderPanel() {
-    super(new BorderLayout());
-    add(myPanel, BorderLayout.CENTER);
-
     myHintTextArea.setLineWrap(true);
     myHintTextArea.setWrapStyleWord(true);
     myPlaceholderTextArea.setBorder(BorderFactory.createLineBorder(JBColor.border()));
@@ -109,6 +106,10 @@ public class CCCreateAnswerPlaceholderPanel extends JPanel {
     updateHintNumberLabel();
   }
 
+  public JPanel getMailPanel() {
+    return myPanel;
+  }
+
   private class GoForward extends AnAction {
 
     public GoForward() {