GUI - always on top

Asked by Maurice Richard on 2017-03-01

I'm looking to force my GUI to appear at a specific location and be "always on top".

I've been looking, but can't seem to find a way to do this. Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
Maurice Richard
Solved:
2017-03-01
Last query:
2017-03-01
Last reply:
Maurice Richard (flashfires) said : #1

Figured this out.

#genrrates interface for the user
frame = JFrame("Some Title")
frame.setAlwaysOnTop(True)
frame.setLocation(100, 100)
frame.setSize(200, 100)
frame.setLayout(BorderLayout())
label = JLabel('Label text goes here. ')
frame.add(label, BorderLayout.NORTH)
button = JButton('Button Text Here',actionPerformed=ProcessClick)
frame.add(button, BorderLayout.SOUTH)
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)
frame.setVisible(True)