title: Components size not adjustable in JFrame
body: <p>I'm trying to make a JFrame with a JProgressbar and a JButton inside, for the user to be see how far the process is and able to abort the process.</p>
  
  <p>The only issue I seem to encounter, the progressbar and button components to always adjust to the JFrame size, and not the size I set them to. See picture one; <a href="http://i.stack.imgur.com/5zf7A.png" rel="nofollow">Picture 1</a></p>
  
  <p>The goal is to make it look like this example; <a href="http://i.stack.imgur.com/PcflF.png" rel="nofollow">Picture 2</a></p>
  
  <p>Does anyone have some suggestions?
  See my code below;</p>
  
  <pre><code>JFrame f = new JFrame("Retrieve Datalog");
  JButton b = new JButton("Abort");
  
  JProgressBar progressBar = new JProgressBar();
  
  f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  f.setIconImage(ICONBAR.getImage());
  f.setResizable(false);
  f.setSize(300, 100);    
  f.setLocationRelativeTo(getFrame());      
  b.setSize(50, 10);            
  
  progressBar.setSize(f.getWidth() - 100, f.getHeight() - 50);    
  progressBar.setValue(50);
  progressBar.setStringPainted(true);
  
  f.add(progressBar, BorderLayout.NORTH);
  f.add(b, BorderLayout.CENTER);    
  f.setVisible(true);
  </code></pre>
  
  <p>PS:
  I'm using NetBeans 8.1 IDE, JDK v8u91</p>