// refresh/build method:
  public void refresh(Nifty panel) {
    if (!visible) {
      return;
    }

    // disable other existing layers
    for (Element l : panel.getScreen("start").getLayerElements()) {
      l.disable();
    }

    Element layer =
        new LayerBuilder("journal layer") {
          {
            childLayoutAbsolute();
            width("100%");
            height("100%");
          }
        }.build(panel, panel.getScreen("start"), panel.getScreen("start").getRootElement());

    // make overall panel
    Element back =
        new PanelBuilder("back") {
          {
            childLayoutHorizontal();
            x(Integer.toString(screen_x) + "px");
            y(Integer.toString(screen_y) + "px");
            width("50%");
            height("60%");
            style("nifty-panel");
          }
        }.build(panel, panel.getScreen("start"), layer);

    // arc selection panel
    // make frame
    Element arcpanel =
        new PanelBuilder() {
          {
            childLayoutVertical();
            width("40%");
            height("100%");
            style("nifty-panel");
          }
        }.build(panel, panel.getScreen("start"), back);
    // fill with arc select panel
    panel_arc_select.refresh(panel, arcpanel, true);

    // make arc/segment edit panel
    Element arceditpanel =
        new PanelBuilder() {
          {
            childLayoutVertical();
            width("60%");
            height("100%");
          }
        }.build(panel, panel.getScreen("start"), back);

    // fill panel
    panel_arc_edit.refresh(panel, arceditpanel);
  }
 // update
 public void update() {
   if (!visible) {
     return;
   }
   // update dependent sub-panels
   panel_arc_select.update();
   panel_arc_edit.update();
 }