Good day to all! It is necessary to hide the buttons: close, maximize, minimize. How to do it?

    2 answers 2

    The window object has a setUndecorated (true) method.

    Added.

    public class NewClass extends JWindow{ public static void main(String args[]) { NewClass nc = new NewClass(); nc.setSize(100, 200); nc.setVisible(true); } } 
    • tried, even import javax.swing. *; put in. Visual Studio 2005 (the program should preferably be made on it) gives the error Cannot find method 'setUndecorated (boolean)' in 'WindowsApplication4.watchwindow' - SKYLINEGTR
    • Updated response. - Julien Sorel
    • Cannot find type 'JWindow' :( - SKYLINEGTR
    • JWindow in my opinion JFrame, for that matter. - Dex
    • Why the hell was VS2005? He is only on J # like .. - cy6erGn0m

    Ooh ... And how do you put it in Java nc.setVisible(true); if you need to be like this:

     JFrame jFrame = new JFrame(); jFrame.setResizable(false); 

    Yes, and true - this is true, respectively, should be false in order to hide, and if you use JWindows.setResizable(false) - the title also disappears, respectively, JFrame is better in this case.