954,554 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Remove Borders Java Swing App

Hy ,

Is there any way to remove the windows borders (the upper with the name and (space) close , minimize , maximize ,the right one , left , down) from an java app?
I develop the app in NetBeans , so here is my code for opening the "main" window where are all the buttons , menus .
I also determine the size of frame , location where to open.



@Override protected void startup() {
        //show(new GestiuneView(this));
        GestiuneView myFrame = new GestiuneView(this);
        myFrame.getFrame().setSize(1200,700);
        myFrame.getFrame().setVisible(true);
        // Get the size of the screen
        
        //myFrame.getComponent().setb
        Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
        // Determine the new location of the window
        int w = myFrame.getFrame().getSize().width;
        int h = myFrame.getFrame().getSize().height;
        int x =  (dim.width-w)/2;
        int y = ((dim.height-h)/2)-30;
        // Move the window
        myFrame.getFrame().setLocation(x, y);
        
        
        
    }
Attachments poza.png 22.08KB
nsyncpilu
Light Poster
49 posts since Jul 2011
Reputation Points: 10
Solved Threads: 0
 

setUndecorated(true);
(do this before making visible etc)

JamesCherrill
Posting Genius
Moderator
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
 

Thank You Very Much

nsyncpilu
Light Poster
49 posts since Jul 2011
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: