Custom Lock Screen

Here is my implementation of my custom lock screen.

First, make a app script with the following code. I placed this in app.gui.

def lockScreen(): import system.nav if globals().has_key('lockScreen'): lockScreen.visible = 1 else: global lockScreen lockScreen = system.nav.openWindow('Lock Screen') lockScreen.setDefaultCloseOperation(lockScreen.DISPOSE_ON_CLOSE) Application.getRootPane().getLayeredPane().add(lockScreen)

Also, before calling this script, you need to run this script atleast once. I play this in my initial login script, just after opening my main menu bar. This sets a reference to the JFrame that the project is running inside of.

from javax.swing import SwingUtilities,JFrame global Application Application = SwingUtilities.getAncestorOfClass(JFrame, menu)

Finally, run this code to lock the screen. I have a menu option to lock the screen and also a Client Timer script that locks the screen after 15 minutes of inactivity

app.gui.lockScreen()


Thanks for all the sample code you post.

I like the Easy button on this screen!

See, I did look at it.

Dennis