https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/FlowLayout.html
// When creating layout
public FlowLayout(int align, int hgap, int vgap)
new FlowLayout(FlowLayout.LEADING, 0, 0);
// remove horizontal gap
public void setHgap(int hgap)
layout.setHgap(0);
// remove vertical gap
public void setVgap(int vgap)
layout.setVgap(0);
No comments:
Post a Comment