Ce l'ho fatta. Posto il codice che ho fatto nel caso in cui serva a qualcun altro.
private void formWindowStateChanged(java.awt.event.WindowEvent evt) {
adatta_elementi_in_finestra_();
}
private void formComponentResized(java.awt.event.ComponentEvent evt) {
adatta_elementi_in_finestra_();
}
public void adatta_elementi_in_finestra_() {
System.out.println(super.getSize().getWidth());
System.out.println(super.getSize().getHeight());
int w = (int) super.getSize().getWidth();
int h = (int) super.getSize().getHeight();
int ww = w - 147 - 25;
int hh = 10;
getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(ww, hh, 147, 30));
hh += 30;
getContentPane().add(jButton5, new org.netbeans.lib.awtextra.AbsoluteConstraints(ww, hh, 147, 30));
hh += 30;
getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(ww, hh, 147, 30));
hh += 30;
getContentPane().add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(ww, hh, 147, 30));
hh += 30;
getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(ww, hh, 147, 30));
hh += 30;
getContentPane().add(jButton6, new org.netbeans.lib.awtextra.AbsoluteConstraints(ww, hh, 147, 30));
getContentPane().add(
jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(
10, 10, ww - 20, h - 60));// W H
hh = h - 55 - 50 - 50;
getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(ww , hh, 147, 50));
hh = h - 55 - 50;
getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(ww, hh, 147, 50));
}