@@ -0,0 +1,1790 @@
+import ij.*;%0Aimport ij.gui.*;%0Aimport ij.plugin.frame.*;%0Aimport java.awt.*;%0Aimport java.awt.event.*;%0A%0Apublic class Cell_Segmentation extends PlugInFrame %7B%0A%0A  public final int WINDOW_WIDTH  = 140;%0A  public final int WINDOW_HEIGHT = 90;%0A%0A  // External%0A  public RoiManager roiMgr;%0A%0A  // Internal%0A  static PlugInFrame instance;%0A%0A  public Cell_Segmentation() %7B%0A    super(%22Cell Seg%22);%0A%0A    // Open ROI Manager%0A    roiMgr = RoiManager.getInstance();%0A    if (roiMgr == null)%0A      roiMgr = new RoiManager();%0A%0A    // Open Cell Seg%0A    if (instance != null)%0A      instance.toFront();%0A    else %7B%0A      WindowManager.addWindow(this);%0A      setSize(WINDOW_WIDTH, WINDOW_HEIGHT);%0A      GUI.center(this);%0A      setVisible(true);%0A      instance = this;%0A    %7D%0A  %7D%0A%0A  // Overrides Component.addNotify(). getInsets() must be called after%0A  // addNotify() or it will not return the title bar height.%0A  public void addNotify() %7B%0A    super.addNotify();%0A%0A    int xm = 20; // x margin%0A    int ym = getInsets().top + 25; // y margin%0A    int yw = 25;%0A    int yi = 10;%0A%0A    setLayout(null);%0A    setForeground(java.awt.Color.darkGray);%0A    setResizable(false);%0A%0A    Button segmentBtn = new Button(%22Segment%22);%0A    // segmentBtn.addActionListener(null);%0A    // segmentBtn.addKeyListener(null);%0A    segmentBtn.setName(%22segment%22);%0A    segmentBtn.setBounds(xm, ym, WINDOW_WIDTH - xm*2, yw);%0A    add(segmentBtn);%0A%0A    // Button filterBtn = new Button(%22Filter%22);%0A    // filterBtn.addActionListener(null);%0A    // filterBtn.addKeyListener(null);%0A    // filterBtn.setName(%22filter%22);%0A    // filterBtn.setBounds(xm, ym + (yw + yi), WINDOW_WIDTH - xm*2, yw);%0A    // add(filterBtn);%0A  %7D%0A%0A  // Overrides windowClosing in PluginFrame.%0A  public void windowClosing(WindowEvent e) %7B%0A    super.windowClosing(e);%0A    instance = null;%0A  %7D%0A%7D%0A

Implement the layout