Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (577)
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 1125 times)
0 Members and 1 Guest are viewing this topic.
Offline Sequalit

Junior Duke





« 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?

while(gettingTired())
     crankOutMoreCode();
     if(asleep()){
          wakeUp();
          makeCoffee();
          chugCoffee();
     }
}

-Sequalit
Offline moogie

JGO Knight


Medals: 13
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

http://skinlf.l2fprod.com/

here is a tutorial for it which may help you:

http://skinlf.l2fprod.com/tutorials/page4/tutorial-clock.php
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: 816
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 Ninja


Medals: 52



« 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 Duke





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

thanks for the help guys! =D


while(gettingTired())
     crankOutMoreCode();
     if(asleep()){
          wakeUp();
          makeCoffee();
          chugCoffee();
     }
}

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

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (49 views)
2014-10-17 03:59:02

Norakomi (38 views)
2014-10-16 15:22:06

Norakomi (31 views)
2014-10-16 15:20:20

lcass (35 views)
2014-10-15 16:18:58

TehJavaDev (65 views)
2014-10-14 00:39:48

TehJavaDev (65 views)
2014-10-14 00:35:47

TehJavaDev (55 views)
2014-10-14 00:32:37

BurntPizza (72 views)
2014-10-11 23:24:42

BurntPizza (43 views)
2014-10-11 23:10:45

BurntPizza (84 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org 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‑gaming.org
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!