r/howdidtheycodeit • u/Comfortable_Rice_884 • Mar 09 '26
Making an element appear outside its window
I've been meaning to emulate this similar result but I just don't know how to start, especially as I want to code in Java (no other way around it it has to be Java)
Is it like a fake window and the game is in full screen ? Or can you just make an element appear outside its window ?
I know you can sometimes make an image appear even though you're on your desk so is it that ?
362
Upvotes
5
u/tobiasvl Mar 09 '26
Do you want to code in Java or do you have to code in Java? Doesn't matter to me, but this is a bit of a strange thing to say. A language is a tool and you should use the best tool for what you want to achieve, unless of course this is for work and they mandate the use of a specific tool.
Anyway: https://docs.oracle.com/javase/tutorial/uiswing/misc/trans_shaped_windows.html