title: How can I remove just the Maximize button from a JFrame?
body: <p>I have a <a href="http://download.oracle.com/javase/1.4.2/docs/api/javax/swing/JFrame.html" rel="noreferrer">JFrame</a> and want to remove the <strong>maximize</strong> button from that.</p>
  
  <p>I wrote the code below, but it removed maximize, <em>minimize, and close</em> from my <code>JFrame</code>.</p>
  
  <pre><code>JFrame frame = new JFrame();
  frame.add(kart);
  frame.setUndecorated(true);
  frame.setVisible(true);
  frame.setSize(400, 400);
  </code></pre>
  
  <p>I want to only remove the maximize button from the <code>JFrame</code>.</p>