aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JFrame declared as setAlwaysOnTop doesn't stay on top during slide show Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFrame declared as setAlwaysOnTop doesn Watch "JFrame declared as setAlwaysOnTop doesn New topic
Author

JFrame declared as setAlwaysOnTop doesn't stay on top during slide show

Ravindra Appikatla
Greenhorn

Joined: Apr 27, 2006
Posts: 4
Hi,

We came across a very typical difference in the behavior of JFrame and JWindow.

We are maintaining a desktop application developed in java swing with one of the functionality to capture the screen. The application is a JFrame with various buttons added to it. The JFrame is set as setAlwaysOnTop(true). This screen capture works fine for all cases expect when OpenOffice presentation is running in slideshow mode on Ubuntu 8.04.

When the slideshow for presentation is activated, the presentation is coming on top of JFrame. Even though JFrame is declared as setAlwaysOnTop, it is not coming on top of slideshow. This is preventing the user from initiating the capture. This is happening only on Ubuntu (Linux Flavor). It works fine on Windows.

When we made a minor change (i.e. changed the JFrame to JWindow), it is staying always on top even when slideshow is activated.

Please go though the below example code. When the below code is run, the JFrame stays on top till a presentation is opened and slideshow activated. When slide show is running, it goes behind the slide show. If you change the JFrame to JWindow (shown in commented line), it is staying always on top even when slideshow is activated and we don’t even have the setAlwaysOnTop() property for JWindow.



Can anybody explain how can I make my JFrame to sit on top of PPT slide show as that of JWindow or any workaround to achieve this?

Any help in this regard is highly appreciated.

Thanks & Regards,

Ravindra Appikatla
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4664
    
    5

Cross posted.
http://www.javaprogrammingforums.com/awt-java-swing/3889-jframe-declared-setalwaysontop-doesnt-stay-top-during-slide-show.html
http://www.java-forums.org/awt-swing/27247-jframe-declared-setalwaysontop-doesnt-stay-top-during-slide-show.html

Any more?

edit
http://forums.sun.com/thread.jspa?threadID=5433726
http://www.linuxforums.org/forum/ubuntu-help/162127-jframe-declared-setalwaysontop-doesnt-stay-top-when-presentation-slideshow-i.html


luck, db
There are no new questions, but there may be new answers.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10535
    
    9

Wow! I mean wow! Im speechless

Thanks Darryl.

Ravindra,
Please read http://faq.javaranch.com/java/BeForthrightWhenCrossPostingToOtherSites


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Ravindra Appikatla
Greenhorn

Joined: Apr 27, 2006
Posts: 4
Maneesh Godbole wrote:Wow! I mean wow! Im speechless

Thanks Darryl.

Ravindra,
Please read http://faq.javaranch.com/java/BeForthrightWhenCrossPostingToOtherSites



Sorry guys. Didn't know about the cross posting guidelines. Posted the question in sun and linux forums and waited for 2 days without any help. Since it's kinda urgent work, I've posted in other forums as well.

Now, can somebody help me out please.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> Now, can somebody help me out please.

If someone has first hand experience of your problem, they would most likely post a solution, since it is from memory.

the rest of us would need to spend time writing demo code and testing to see if any theories worked.
now, given your cross-posts, it's unlikely anyone would invest their time in your problem.

you may have to pay someone e.g. rent-a-coder, with specific requirements of nullifying your problem
 
 
subject: JFrame declared as setAlwaysOnTop doesn't stay on top during slide show