How to make Netbeans use swing

Often when designing forms in netbeans, they will look much different in runtime and can ruin the layout. One way to avoid this problem is to make netbeans use the swing gui so that the forms are the same.

  1. Close netbeans
  2. Open netbeans.conf (/etc/netbeans.conf)
  3. Look for “netbeans_default_options” and add--laf javax.swing.plaf.metal.MetalLookAndFeel

    to the end of it, so it would look something like

    netbeans_default_options="blahblah --laf javax.swing.plaf.metal.MetalLookAndFeel"

  4. Open Netbeans again and it should have the swing look like above