Two Laptop Bag*
The moose likes Swing / AWT / SWT and the fly likes When invisible window appears w/cursor on top, has blank block... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "When invisible window appears w/cursor on top, has blank block..." Watch "When invisible window appears w/cursor on top, has blank block..." New topic
Author

When invisible window appears w/cursor on top, has blank block...

Dan Bizman
Ranch Hand

Joined: Feb 25, 2003
Posts: 387
I have an "invisible" window that slowly appears (one of the things it does is take a picture of the background). However, if when it's first appearing, the cursor is right on top of it, it nevers paints the square around the cursor -- instead that stays as the background and cursor.

Any idea what causes this and how to fix it?

i can't call repaint because doing so:

1. makes it flash for a second (so then it's not a smooth transition)
2. it makes it 100% visible, instead of slowly appearing
aymane chetibi
Ranch Hand

Joined: Apr 12, 2006
Posts: 175
I am sorry, I can't answear your question, but instead I would be very grateful if you can show me how did you make the windows appearing smoothly.


I would really appreciate that!!!
thanks!
Dan Bizman
Ranch Hand

Joined: Feb 25, 2003
Posts: 387
Originally posted by aymane chetibi:
I am sorry, I can't answear your question, but instead I would be very grateful if you can show me how did you make the windows appearing smoothly.


I would really appreciate that!!!
thanks!



I'm using JNI and doing a windows-only version. i'd like to do Linux too but haven't had a chance/need yet. You still want it?
aymane chetibi
Ranch Hand

Joined: Apr 12, 2006
Posts: 175
Is the moving of the box implemented in c++ of something? is yes, then I don't need it( thanks a lot though).

If it is in java, then yes I would love to have it.
what are you using JNI for ?


regards,
Dan Bizman
Ranch Hand

Joined: Feb 25, 2003
Posts: 387
Originally posted by aymane chetibi:
Is the moving of the box implemented in c++ of something? is yes, then I don't need it( thanks a lot though).

If it is in java, then yes I would love to have it.
what are you using JNI for ?


regards,


Moving? I don't follow.

What mine does is it's invisible and slowly appears in one spot. I use the JNI because making a window go from transparent to translucent to fully visible is no where near smooth. It looks unprofessional, so we had to use JNI.
aymane chetibi
Ranch Hand

Joined: Apr 12, 2006
Posts: 175
well yea I would love to have a look at it.
My email is : A.Chetibi@aui.ma

one question: do you think I would be able to easily integrate it whithin my project in JBuilder?

regards,
Dan Bizman
Ranch Hand

Joined: Feb 25, 2003
Posts: 387
No one else has ever experienced this same problem? (i.e. the window has a "see-through" space where the cursor is when "appearing")
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
not done what you've described, but possible workarounds might be:
1)
get screen size
use Robot's mouseMove to move the cursor to bottom right corner (won't be seen)
snapshot
mouseMove cursor back to middle of screen

2)
set cursor to an invisible cursor
snapshot
reset cursor
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: When invisible window appears w/cursor on top, has blank block...
 
Similar Threads
scriptaculous and text appearing too soon
Why if override paint (and call super.paint) do components of JWindow not show up?
Difference between MenuBar and MenuItem
JTree: strange appearance / broken tree
Cursor not setting