Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: SWT browser stays on top of other components [WinOS]

  1. #1
    Member
    Join Date
    Oct 2011
    Posts
    53
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default SWT browser stays on top of other components [WinOS]

    Hello,

    I have used SWT for my application (a simple browser.
    I have noticed that under Windows, the browser stays on top of other components (in this case the comboboxes).

    On MacOSX it does not happen.

    Is there a way to fix this?

    Here is a screenshot:

    ù


  2. #2
    Member
    Join Date
    Oct 2011
    Posts
    53
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Re: SWT browser stays on top of other components [WinOS]

    I have tried to work on the Shell or on the BrowserPanel itself, but still the issue seems to not be solved. And it is weird as before it was not happening.

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: SWT browser stays on top of other components [WinOS]

    Most likely a matter of how the OS paints SWT and Swing, and posting an SSCCE that reproduces the problem might help. Simple solution: move the drop down menus to the bottom.

  4. #4
    Member
    Join Date
    Oct 2011
    Posts
    53
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Re: SWT browser stays on top of other components [WinOS]

    I fixed it by simply (simply now, I used like an hour of my Saturday for this....) using:

    mainPanel.setVisible(false);
    mainPanel.setVisible(true);

  5. #5
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    1,136
    My Mood
    Grumpy
    Thanks
    20
    Thanked 82 Times in 78 Posts
    Blog Entries
    1

    Default Re: SWT browser stays on top of other components [WinOS]

    Quote Originally Posted by Nesh108 View Post
    I fixed it by simply (simply now, I used like an hour of my Saturday for this....) using:

    mainPanel.setVisible(false);
    mainPanel.setVisible(true);
    It's not actually the solution towards cross platform issues, and if mainPanel is the main JFrame of your application(Swing), making it's visible property false or true doesn't effect actually. Well, it's good that you are able to solve this but i must tell you that it's not what you should think as solution for this problem.

  6. #6
    Member
    Join Date
    Oct 2011
    Posts
    53
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Re: SWT browser stays on top of other components [WinOS]

    I simply noticed that whenever I was changing panel and then choosing to go back to the mainPanel the issue was not present anymore. So I simply did 1+1. I put that code into a method called 'refresh' and then I call it whenever I use something on the GUI.
    Anyway sadly SWT appears to be quite buggy.

Similar Threads

  1. Laying out components.
    By newbie in forum AWT / Java Swing
    Replies: 1
    Last Post: August 14th, 2011, 04:37 AM
  2. how to position gui components
    By programmer1 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: June 11th, 2011, 12:45 PM
  3. Interaction between components.
    By SyntheticD in forum What's Wrong With My Code?
    Replies: 4
    Last Post: February 9th, 2011, 07:32 PM
  4. Getting Size of Components
    By aussiemcgr in forum AWT / Java Swing
    Replies: 3
    Last Post: July 26th, 2010, 03:41 PM
  5. Components that interact with eachother
    By Flamespewer in forum AWT / Java Swing
    Replies: 2
    Last Post: February 25th, 2010, 09:27 PM