How do I remove the maximize and minimize buttons from a JFrame?
问题 I need to remove the maximize and minimize buttons from a JFrame. Please suggest how to do this. 回答1: import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; public class Dlg extends JDialog { public Dlg(JFrame frame, String str) { super(frame, str); addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent evt) { System.exit(0); } }); } public