Suppose, you have to develop a application which requires desktop locking- means user can not use the system if you don't allow to use it. For such kind of application we require that (I assume that it is a swing application) the JFrame should not be closed, maximized, minimized or movable.
To do so, we require remove title bar along with close, maximize and minimize buttons (windows buttons), so that JFrame could not be closed, moved, maximized or minimized
setUndecorated(true); //remove title bar
setResizable(false); //make frame static
setType(javax.swing.JFrame.Type.UTILITY); //Jframe will not show in task bar
setAlwaysOnTop(true); //set always on top if we don't close it using any action
To do so, we require remove title bar along with close, maximize and minimize buttons (windows buttons), so that JFrame could not be closed, moved, maximized or minimized
setUndecorated(true); //remove title bar
setResizable(false); //make frame static
setType(javax.swing.JFrame.Type.UTILITY); //Jframe will not show in task bar
setAlwaysOnTop(true); //set always on top if we don't close it using any action
No comments:
Post a Comment