Results 1 to 3 of 3
- 01-04-2009, 04:33 PM #1
Member
- Join Date
- Jan 2009
- Posts
- 2
- Rep Power
- 0
Image that remains always on the top of the windows
hello everyone,
I would like to write an application in java which should keep my image always on the top of the windows desktop. Just like VirtuaGirl applications.
Is it possible to achieve this in java?
If yes, then what are the packages i need to use ?
Image should not be in a box or an applet window. Only the image shape say fish shape should float on the window.
-Satish Nankani (satishnankani@gmail.com)
- 01-04-2009, 04:51 PM #2
Senior Member
- Join Date
- Nov 2008
- Posts
- 286
- Rep Power
- 5
You say "float on the window", so does that mean you want the image to remain inside one of your application's windows, just on top of everything else in that Window? If so, look at the setGlassPane() method.
If you mean "on top of everything" on the desktop, then you can "almost" do it:
- create a (J)Window just the right size for your image (a Window has no border, unlike a (J)Frame) and paint your image into that
- call setAlwaysOnTop() to be true on your window
- now, if your image isn't rectangular the tricky bit: I don't think there's a way to make a Java window transparent. But what you can do is create a component whose paint method uses the Robot class to capture the screen behind and then paint this. I seem to recall the "Swing Hacks" book (O'Reilly) contains an example.Neil Coffey
Javamex - Java tutorials and performance info
- 01-06-2009, 07:40 PM #3
Member
- Join Date
- Jan 2009
- Posts
- 2
- Rep Power
- 0
Thanks for the reply neilcoffey.
Eventhough i was not able to put my requirement properly, I highly appreciate the way you answered both the possibilities of the question.
Actually I want to keep my image on the top of everything, which should be tranparent, say something like when we watch the TV channels we see Channel logo's on the top. like HBO,AXN
Similar Threads
-
[SOLVED] Windows Linux conflict - TrayIcon image not display in Linux
By Eranga in forum Advanced JavaReplies: 6Last Post: 04-08-2009, 04:05 AM -
Canvas Image popups another image (SWT)
By SpaceY in forum New To JavaReplies: 2Last Post: 11-11-2008, 01:25 PM -
drawing an image to an offscreen image
By hunterbdb in forum Java 2DReplies: 9Last Post: 10-30-2008, 06:17 PM -
Converting multiple banded image into single banded image... Image enhancement
By archanajathan in forum Advanced JavaReplies: 0Last Post: 01-08-2008, 05:29 PM -
swt for windows
By Gajesh Tripathi in forum SWT / JFaceReplies: 2Last Post: 10-18-2007, 06:43 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks