Trying to use java's swing, the frame element doesn't seem to add any other element into it. In this code block:
JFrame f = new JFrame();
f.setSize(400,400);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JLabel l = new JLabel("foo");
f.add(l);
f.setVisible(true);
      
The label is not added under sway (wayland) and dwm (xorg). Surprisingly, it does work under i3 (xorg). Does swing use some non-standard x11 extension that i3 implements and dwm doesn't? The weird thing is the frame does show, but I can't seem to add any elements to it, be it a label or a pane. For now i just open i3 on another console and use that. I don't have gnome/kde/xfce installed to test on.