JFrame只有一个setResizable(false)方法可以禁用缩放,没有可以禁用最小化,最大化的函数!而且你要的是去掉这些按钮,你可以换成别的对象啊,想JWindow之类的!
不好意思,我对GUI的程序不懂!

解决方案 »

  1.   

    如果在MDI程序中就是把JInternalFrame里面的后几个属性写为假就行了!
      

  2.   

    去掉最大化按钮就只要把setResiable(false)就行啦
    去掉最大化和最小化就用对话框吧
    如果都去掉就把标题栏去掉就行了setBorder(null)
      

  3.   

    都没答到点子上,去掉标题栏的最大化,最小化,关闭按钮,怎么用JWINDOUS的方法实现?
    解决了分全奉上
      

  4.   

    JWindow w=new JWindow();
    w.setBounds(100,100,300,300);
    w.show();
    在JWindow里你可以象JFrame一样的add东西,
    但是JWindow没有border,titlebar,menubar,
    而且无法改变window的size,无法移动.
    JFrame是JWindow OVERWRITE而来,所以
    JWindow的所有method,instance都可以使用.
    如果你不使用上面的功能,no problem,
    如果需要的话,还是用JFrame的好.
      

  5.   

    use L&F can satisfy your need.
    One simple way is to extends DefaultMetalTheme, and set the size of InternelFrame's minimizeIcon, maxmizeIcon and closeIcon to 0.
      

  6.   

    /**
     * Why should I write these type of stupid code???
     *
     */
    import javax.swing.plaf.metal.*;
    import javax.swing.*;
    import java.awt.event.*;class NoIconTheme extends DefaultMetalTheme {    public String getName() { return "WithoutIcon"; }
        
        public void addCustomEntriesToTable(UIDefaults table) {
             super.addCustomEntriesToTable(table);
             final int size = 0;
             table.put("InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(size));
             table.put("InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(size));       
             table.put("InternalFrame.minimizeIcon", MetalIconFactory.getInternalFrameAltMaximizeIcon(size));  
        }}
    public class NoIconFrame extends JFrame {    public static void main( String[] args ) {       
            JFrame.setDefaultLookAndFeelDecorated(true);        try {
                javax.swing.plaf.metal.MetalLookAndFeel.setCurrentTheme( new NoIconTheme());
                UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
            }  
            catch ( Exception e ) {}
                
            NoIconFrame frame = new NoIconFrame();
    frame.setTitle("Alt+F4 to close"); 
    frame.addWindowListener(new WindowAdapter(){
    public void windowClosing(WindowEvent e){
    System.exit(0);
    }
    });
    frame.setSize(300,400);
            frame.setVisible(true);
        }
    }
      

  7.   

    我已经用了JSWING,现在的解决方式是从JSWING里去掉最小最大花和关闭按妞。
    请教各位了~~~~~~~~~~~~~
      

  8.   

    用JDialog不就得了?
    费解!!!
      

  9.   

    My answer works, give me credits.
      

  10.   

    frame.setResiable(false);
    frame.setBorder(null);
    frame.setUndecorated(true);OK了
      

  11.   

    可以参考一下 JDialog 类看看他们是怎么实现的
      

  12.   

    frame.setBorder(null);这个是什么方法?找不到
    frame.setUndecorated(true);这个太霸道,把整个标题都搞掉了。呵呵,太猛了。
    我要留下标题栏,在这个前提下能够实现如题的条件吗?
    :P
      

  13.   

    wobelisk()'s answer is right.......You must use L&F to solve you question.
      

  14.   

    setUndecorated(true);可以,看来不符合搂住的胃口学习!
      

  15.   

    JDialog只有关闭钮。要不只好用JWindow了!
      

  16.   

    你从JComponent继承自己做一个得了
      

  17.   

    由于项目比较急,我用了
    setUndecorated(true);方法来解决
    感谢各位~~~~
    再问一问L&F什么意思:))
    星期1结贴,给答题的人分数~~~
      

  18.   

    JDialog
    目前我只懂这么多。
    : )
      

  19.   

    只能用jwindow了
    jframe只能用禁最小化