I can't drag my G4P GWindows - Help!

OK, I am a total newvie, and I am using Processing 3.5.4 with the G4P library. When I say newbie, I really, really mean it. A week ago I thought a class was a room full of kids, and I still have no clue what a handler is. But…

I am writing (and by “writing”, I mean “stealing someone else’s code and trying to work out what the hell it all means”) a little app that has a main window and some G4P-created GWindows.

The Gwindows are created like this:

First by defining the windows:

GWindow patterningWindow,
        knitWindow,
        configWindow;

Then by calling them in void setup:

void setup() {
  dh = new DisposeHandler(this);
  
  visualpassapSettings = new JSONObject();

  size(1080, 800);
  noSmooth();
  surface.setTitle("Visual Passap");
  UsedFont = loadFont("GillSansMT-48.vlw"); 
  textFont(UsedFont);

  //load Logo
  visualpassapLogoImage = loadImage("VP_logo_80px.gif");
  displayButtonsGUI(); //GUI tab
  drop = new SDrop(this);
  //load BasicSettings
  visualpassapSettingsName = "data/BasicVPSettings.json";
  loadvisualpassapSettingsFile();
  
   // create Windows
  createConfigWindow();
  configWindow.setVisible(false);
  createPatterningWindow();
  patterningWindow.setVisible(false);
  createKnitWindow();
  knitWindow.setVisible(false);
}

And then by creating my own void-thingy (is that a class?) to actually create it:

public void createKnitWindow() {
  knitWindow = GWindow.getWindow(this, "Knit", 0, 0, 200, 400, JAVA2D);
    displayButtonsKnit();
    knitWindow.setAlwaysOnTop(true);
    knitWindow.addDrawHandler(this, "knitDraw");
    knitWindow.addMouseHandler(this, "knitMouse");
}

but they are fixed firmly in place and I can’t drag them around with my mouse. How can I make this be possible? I know that it is possible because it works in one of the examples but I am blowed if I can see where my code is different…

Please can you explain slowly and carefully for the hard of thinking? Thank you!

So the library examples that come with G4P work but your code doesn’t. I can see no obvious error but it is impossible to test your code because

  1. it is incomplete
  2. uses assets (images and fonts not available to me)

I suggest that you create a small sketch (without external assets) that demonstrates the problem and post that.

BTW if you are going to use G4P a lot then you might try the GUI Builder tool.