Insets insets = new Insets(0, 10, 10, 10);
Dimension snap = new Dimension(10, 10);
ComponentResizer resizer = new ComponentResizer(insets, snap);
resizer.registerComponent(frame);
ComponentMover cm = new ComponentMover();
cm.setDragInsets(insets);
insets = new Insets(-100, -100, -100, -100);
cm.setEdgeInsets(insets);
cm.registerComponent(frame);
}
final Timer timer = new Timer(2_000, new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {