JPanel createCustomPanel() {
    JPanel p = new JPanel();
    p.setLayout(new GridLayout(1, 1));
    sink = new PartSink(PartType.EXPRESSION_PART);
    sink.addCombineListener(
        new CombineListener() {
          public void combined() {
            WorkspaceObject c = sink.getContainedPart();
            Object o = c.getPart(); // we know this is an expression because of our sink restriction
            Expression exp = (Expression) o;
            randInt.setMax(exp);
          }

          public void split() {
            randInt.setMax(null);
          }
        });
    sink.setToolTipText("Maximum possible value of the random number");
    p.add(sink);
    return p;
  }