Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (602)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (649)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Pictures outside of a window?  (Read 1331 times)
0 Members and 1 Guest are viewing this topic.
Offline Sequalit

Junior Devvie

« Posted 2006-02-13 05:50:46 »

I was wondering, is there any way in Java that you can make it so that you can have like a dog or cat graphic run around on your windows desktop, instead of being like inside of a JFrame or something, let the desktop be the Frame environment?


Offline moogie

JGO Ninja

Medals: 16
Projects: 6
Exp: 10 years

Java games rock!

« Reply #1 - Posted 2006-02-13 07:12:37 »

I believe you can.

I have not tested it, however i believe java 1.5 has a method ( setAlwaysOnTop(boolean) )
which causes the window/frame to always be on top. Thus by removing the decorations from the window and making the frame non-selectable you should be able to achieve what you are after.

I do know and have used a windows only library for java which achieved the same using java 1.4

it is called SkinLF

here is a tutorial for it which may help you:

Java4k RIP 2014
Offline swpalmer

JGO Coder

Exp: 12 years

Where's the Kaboom?

« Reply #2 - Posted 2006-02-13 13:43:17 »

You can't do this properly.  Java does not yet support transparent or irregularly shaped windows.  The closest thing you could do is to use the Robot class to capture the desktop areas that your dog or cat was going to walk over and then blit that background content into your rectangular wind that holds the dog/cat image.

Ages ago I posted a small sample of the technique that simply allowed you to drag a circle around the desktop.

There is an issue in Sun's bug database about the transparent windows and irregular shapes.  It's been there for a while now  (since Java 1.2) and it still doesn't look like it will make it into Mustang.. so that means it is another two years off at least... (sigh...)

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Riven
« League of Dukes »

« JGO Overlord »

Medals: 1019
Projects: 4
Exp: 16 years

Hand over your head.

« Reply #3 - Posted 2006-02-13 16:48:35 »

As long are your cat or dog is completely square, you have no problem Smiley

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings!
Offline cylab

JGO Wizard

Medals: 89

« Reply #4 - Posted 2006-02-13 17:10:53 »

And if they are not just bonsai them  Grin

Mathias - I Know What [you] Did Last Summer!
Offline jbanes

JGO Coder

Projects: 1

"Java Games? Incredible! Mr. Incredible, that is!"

« Reply #5 - Posted 2006-02-13 17:20:54 »

And if they are not just bonsai them  Grin

Hmm... I see I'm not the only one who had that exact same thought after reading Riven's post. (And nearly snorting a Starbucks, BTW. Thanks a lump Riven! Wink)

Java Game Console Project
Last Journal Entry: 12/17/04
Offline Sequalit

Junior Devvie

« Reply #6 - Posted 2006-02-15 06:35:08 »

thanks for the help guys! =D


Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Jesse (15 views)
2015-07-29 04:35:27

Riven (37 views)
2015-07-27 16:38:00

Riven (18 views)
2015-07-27 15:35:20

Riven (21 views)
2015-07-27 12:26:13

Riven (12 views)
2015-07-27 12:23:39

BurntPizza (30 views)
2015-07-25 00:14:37

BurntPizza (41 views)
2015-07-24 22:06:39

BurntPizza (24 views)
2015-07-24 06:06:53

NoxInc (31 views)
2015-07-22 22:16:53

NoxInc (18 views)
2015-07-22 22:13:39
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!