自个写个JDialog就行
this.setResizable(false);
//不准最大化
生成的就没有最大最小化选择按钮了

解决方案 »

  1.   

    不好意思,this.setResizable(false);是去掉热咖啡图标,不是最大最小化处理
    JDialog本身就没有最大最小按钮
    实例如下:
    import javax.swing.*;
    import java.awt.*;
    public class Test extends JDialog {
      JPanel jPanel1 = new JPanel();
      JButton jButton1 = new JButton();
      public static void main(String[] args) {
        try {
          Test alpha = new Test();
          alpha.show();
        }
        catch(Exception e) {
          System.out.println(e);
        }
      }  public Test() {
        try {
          this.setResizable(false);
          this.setSize(300,200);
          jbInit();
        }
        catch(Exception e) {
          e.printStackTrace();
        }
      }
      private void jbInit() throws Exception {
        jButton1.setText("jButton1");
        this.getContentPane().add(jPanel1, BorderLayout.CENTER);
        jPanel1.add(jButton1, null);
      }
    }