Maximized decorated JFrame covers task bar on WinXP. How to avoid?

Hello,
I have found that decorated JFrame covers task bar on Win XP and jdk 1.5 when maximized. I see this problem affects many users. It is annoying for most users of my applications to change window size before accessing task bar. So I have to avoid decorations, inspite the fact that I really like how decorated windows look like.
I have read forum topic which discussed the same problem (http://forum.java.sun.com/thread.jspa?forumID=57&threadID=709917), but it contains no solution.
Here is sample code to reproduce the problem:
import java.awt.Dimension;
import javax.swing.JFrame;
public class Test extends JFrame {
     public Test() {}
     public static void main(String[] args) {
          JFrame.setDefaultLookAndFeelDecorated(true);
          Test frame = new Test();
          frame.setPreferredSize(new Dimension(200,200));
          frame.pack();
          frame.setVisible(true);
}Run it on Win XP and click maximize button. You will see that maximized window covers task bar.
Am I doing something wrong? Maybe it is possible somehow to correct this behaviour programmatically or at least any workaround exists?
Regards,
Roman

Solved the problem finally. It seems I have not read previous forum topic (http://forum.java.sun.com/thread.jspa?forumID=57&threadID=709917) with enough attention.
For thouse who are interested solution is following:
import java.awt.Dimension;
import java.awt.GraphicsEnvironment;
import javax.swing.JFrame;
public class Test extends JFrame {
     public Test() {}
     public static void main(String[] args) {
          JFrame.setDefaultLookAndFeelDecorated(true);
          Test frame = new Test();
          frame.setPreferredSize(new Dimension(200,200));
          GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
          frame.setMaximizedBounds(env.getMaximumWindowBounds());
          frame.pack();
          frame.setVisible(true);
}Regards,
Roman

Similar Messages

  • When i open a link in a new window all my windows on the task bar pop up, how do I stop that happening?

    when i open a link in a new window all my windows on the task bar pop up, how do I stop that happening?

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    You may have switched on caret browsing.
    *http://kb.mozillazine.org/accessibility.browsewithcaret
    You can press press F7 (on Mac: fn + F7) to toggle caret browsing on/off.
    *Tools > Options > Advanced : General: Accessibility: [ ] "Always use the cursor keys to navigate within pages"
    *http://kb.mozillazine.org/Scrolling_with_arrow_keys_no_longer_works
    *http://kb.mozillazine.org/Accessibility_features_of_Firefox

  • Hide JFrame in Task Bar

    Is there away to have a JFrame created but have it not show in the windows task bar at the bottom of the sceen?

    No, but you can with a JWindow.

  • I have lost the task bar/start menu, how do I get them back? I have tried uninstalling and reinstalling without success, the other user on my computer does not have this problem.

    Yesterday, I went to the site for levno computers, using my web access for my work email. I opened the page to view the outlet items and was never able to get back out of it. Finally used ctrl,alt,delete and ended the task. After that the this is what my task bar looks like, I cannot resize or exit using tabs at the top or bottom they are not showing, nor is start showing in the lower left hand corner where I like it. I tried uninstalling and reinstalling that did not help.
    == This happened ==
    Every time Firefox opened
    == July 9, 2010

    Hello Sher.
    If you're talking about the menu bar, press ALT or F10 in your keyboard to make the Menu Bar temporarily visible. If you want it to be permanently visible, go into ''View > Toolbars > Menu Bar'', or right-click the Navigation Toolbar (the Reload button, for example) and select ''Menu Bar''.
    If this doesn't help, right-click the navigation toolbar, select ''Customize...'' and click ''Restore Default Set''. If it doesn't appear right away, try pressing ALT or F10. You can go into ''View > Toolbars > Menu Bar'' to make it permanently visible, or right-click the Navigation Toolbar and select ''Menu Bar''.
    If none of this helps, you may be having a problem with some Firefox add-on that is hindering your Firefox's normal behavior. Try disabling all add-ons (just to check), to see if Firefox goes back to normal.

  • Maximized JFrame obscuring task bar

    I have an application that obscures the windows taskbar when it is maximized (using the JFrame's own maximize button - NOT programmatically). The same happens when this.setExtendedState(JFrame.MAXIMIZED_BOTH) is called.
    J2SE 1.4.0 in windows 2000 is the environment (from what have read, maximize should work well in 1.4). I can create a brand new JFrame and mostly it works - is there some undocumented property that is causing it to maximize to the fullscreen instead of the usable screen?
    Thanks in advance.

    I was hoping that there was a way that made sure the JVM itself would do it (it works most of the time) - such a simple but important thing to end users should NOT require JNI code. Maximising on at least windows and macintosh (and most linux flavours) is pretty well defined - anyone that says it is a platform specific feature is just wrong - it can apply to any GUI system at least in some form.

  • My file, settings, etc. task bar has dissapeard, how do I restore it?

    The taskbar at the very top of the window that has the file, settings, tools, etc. buttons have disapeared from my firefox window. How do I restore this feature?

    What do you mean by tool bar? The menus at the top of the screen?
    Are you in full screen mode?
    To toggle press at same time Command-Control-F

  • Hide Task Bar , Hide all windows notification , Set screensaver

    Hello, 
    Can any one please help me in doing any one or all the customization in
    Windows 7x86 Embedded satndard.
    How to hide Task bar permanently  ? 
    How to set specific logo as screensaver ?
    How to hide all windows notification ?
    I have to do all these setting through MDT and want to include that in base image (Core Image). If you know any thing how to do any of the above settings in
    Windows 7x86 Embedded Standard please reply .
    If you how to do that in MDT via unattend.xml or registry or
    GPO or any thing by which we can do these setting and deploy through MDT. 
    PLEASE HELP!!!

    What I did was to provide the Notifier stage with an owner. (This is only a solution if your application has a single stage.)
    1.  In method initGraphics() remove the line: stage.show();
    2.  Create the following method in Notifier:
    public static void setStageOwner( Stage stageRef )
         INSTANCE.stage.initOwner( stageRef );
    3.  In method showPopup( Notification ) add the following line before:  POPUP.show( stage );
    if ( ! stage.isShowing() )  stage.show();
    else  stage.toFront();
    4. When you setup your application's stage call:
    Notifier.setStageOwner( yourAppsStage );

  • Possible to hide JFrame yet show on task bar?

    Hello All,
    Is this possible? I would like to show the JFrame button on the taskbar, but not show the JFrame itself. This is because there is a JDialog to show, but if the user alternates windows, he is liable to lose the JDialog, unless he presses Alt-Tab, which many users may not know about. It would be preferable to have the application showing in the taskbar, but how to do it without showing the JFrame?
    Thank you,
    Linda

    Why not just use a JFrame instead of a JDialog? That way it gets its own spot on the task bar, and it can contain all the same things a dialog can. If you have some special situation that prevents this solution, please elaborate on why you want an invisible main window with a visible dialog.
    Ian

  • Hide the title bar on the task bar of a JFrame

    Hi all,
    I have create a JFrame with some controls and implement the functionality on it. Now I want to make some modification on the JFrame(actually on the GUI)
    On the visible of JFrame I can see a title bar of the GUI on the taskbar of my screen. I want to stop/hide that when the JFrame is visible. How can I possible to do it.
    I used Netbeans and there I've not found such a option.
    Thanks

    hiwa wrote:
    Try setUndecorated(true) call.Actually this only remove the frame title bar. Not the title remove on the task bar. I think I'm clear with my original post.

  • Preventing a JFrame/dialog from showing in the task bar & gaining focus.

    As the (lengthly) title suggested, I would like to know if it is possible to create a JFrame or JDialog that can run (more or less) on its own without appearing in the task bar or gaining focus when setVisible() is called.
    Anyone know how to do this, or have better Google search term to use than the ones I thought up? ;-)

    The point is for it to stay visible (normally) when when it is not hidden (it is hidden for ~1 second to take a screenshot) and then shown again. The problem with this is that the application currently in focus loosees it (which is very annoying when typing...).
    I'm trying to make a 'desktop button' of sorts that just acts as a tray icon when the system tray isn't supported. I put some effort into making it have a transparent background, but by doing that setVisible() is called every 15 seconds or so. (the frame is alwaysOnTop as well), thus the reason that I don't want the focus to be taken.
    As for not showing in the system tray, I don't really need it although it would certainly make the icon better.
    With that said, is there some way to accomplish this?
    Thanks for the quick reply!

  • Google Spreadsheet tabs are covered by task bar in latest Firefox version

    When I open a Google spreadsheet in FF, I can no longer see the tabs for separate sheets at the bottom of the spreadsheet because they are covered by the task bar. This does not occur when the same spreadsheet is displayed in Chrome and the problems has only just started occurring with FF 4.0. Is there any solution to this?

    The problem seems to be solved suddenly. I don't know why but every time I load maps now I see the full version and not the lite one. It looks so strange…

  • How to I keep iTunes from covering my hidden task bar?

    Is there a way to keep iTunes on the windows OS from dominating so that I can't see my hidden task bar?  This is very annoying as with iTunes open, I'm not able to switch programs using the the task bar.
    I know I can do Alt-TAB and other things, but I don't like iTunes always on top!  I don't use it to watch TV or Movies on, I use my apple TV for that.

    I found the button for IPOD options in Itunes, which appears on the lower right hand corner of Itunes ONLY when the IPOD is plugged in (recommend Apple looks at having it always there) and unchecking the "start Itunes automatically when Ipod is plugged in" box. If you have an IQ over room temperature, your computer doing things automatically for you is usually just not a good idea.

  • About maximizing a JFrame

    I've been looking for a way to maximize a JFrame with JDK 1.3 in pure Java and found out that I can't. Now I want to place my JFrame on my Desktop at maximum size in a way that it does not interfere with e.g. the Windows Taskbar.
    While researching I came across this article:
    http://forums.java.sun.com/thread.jsp?forum=57&thread=116814
    I took the code from jane_jk's post and modified it a bit. Now i have this:
        Dimension dimScreenSize = Toolkit.getDefaultToolkit().getScreenSize();
        setSize(dimScreenSize);
        setVisible(true);
        Rectangle rectVisible = getRootPane().getVisibleRect();
        int iWidth = (int)rectVisible.getWidth();
        int iHeight = (int)rectVisible.getHeight();
        int iX = (int)rectVisible.x;
        int iY = (int)rectVisible.y;
        setBounds(iX,iY,iWidth,iHeight);I'm working with a windows desktop resolution of 1024x768 and my taskbar is attached to the left of the screen. But getVisibleRect does not consider that my taskbar is at the left of the screen. The funktion thinks the taskbar is at the botom of the screen.
    I get:
    iWidth = 1016
    iHeight = 741
    iX = 0
    iY = 0
    I've tried this woth the taskbar at the top and at the right of the screen with similar results.
    Has anybody encountered this too? Is this a bug in the getVisibleRect function?

    You (and jane_jk) misunderstodd what getVisibleRect() does. Take a look at the javadoc:
    Returns ... the intersection of this component's visible rectangle and all of its ancestors' visible rectangles.
    It cannot take any windows into account that are not in the hierarchy. Native windows like the task bar are something different altogether.
    Up to JDK 1.4 there simply is no reliable, portable way to maximize a frame.
    Each of the non-portable or simply hacky ways of maximizing have been discussed before.
    Stephen

  • Lost task bar control

    Since upgrading LV from 7.1.1 to 8.0.1, I no longer have control of the Windows task bar while the vi is running.  For example, I need to use Windows Explorer or the Start button.  Is there a setting for this?   The OS is Win XP-Pro.
    Dave J.

    I'm having trouble with this and find it baffling. 
    Why am I having this problem now that I've upgraded to version 8.0.1?
    If I set FP.State to Minimized or Maximized when the main vi is started, I still do not have access to the task bar.
    If I set FP.State to Standard when the main vi is started, the task bar is covered by the main vi front panel.  However, this happens only the first time when running the program.  Subsequent startings will gain me access to the task bar.  So this means that I'm going to have to start the program twice.  Also, when set to Standard, the vi toolbar is no longer available after the vi is stopped.  Why?
    I tried changing the Window Behavior in vi properties (Default, Floating, Modal) to various settings.  I normally set it to Default in the main vi and Modal in the subvi's.  I also tried to various settings to allow the user to close, resize and minimize the window.  Changing these settings does not help.
    In short, I need the end user to have access to the task bar while the program is running.  This is important because I don't want to shut down the program to gain access to generated reports.  (We use Microsoft Report Generation Toolkit).  I would also like to not run the program twice to get it working.  Is this doable in version 8?
    Please advise...
    Thanks,
    Dave J.

  • SAP Signature Design & Task Bar Auto-Hide Feature

    Hi Experts,
      I'm having a problem with SAP Business One 8.8 PL18 using the new 8.8 SAP Signature Design. We are in a business with 4 professionals and 1 CRM. When we use the SAP Signature Design Skin Style and you have SBO maximized on the screen and you have Windows auto-hide the Task bar. You can't go back to the task bar with your mouse to switch applications or to just go to your start menu. The only way you can make the task bar appear is by pressing the "window key" to make the task bar display. To change applications, you can still use the "Alt Tab feature". If I put the Skin Style to Classic Mode, everything works great with no apparent display problems.
    I've tried this on 3 different operating systems. Windows 7, Windows XP and Windows 2003 Server and the same results. The task bar won't re-pop up if you move your mouse down to it (I tried moving the task bar to the left, top or right to see if that made a difference, and it didn't). I've been using the "Window Key" for now to make the task bar pop up (display), but I think it's a bug with the skin style and not the operating system.
      I've tried to get this resolved with our partner, but I don't think they understand the problem, or are just not willing to acknowledge the problem. They probably think it is a petty problem. We all like the new design and would like to use it properly while still having the task bar auto-hide.
    The question actually is, do you know of this problem, is there something I can disable or do to get it to work (ie: make it run with compatibility mode to something) or do I just have to live with this problem?
    I thank you very much in trying or helping me with this problem
    Ron
    IT Manager

    Hi Ron,
    Welcome you post on the forum.
    I don't have the same version to test. Based on your detailed explanation, I do think it is probably a bug. Since it may not be used by many users, it could have low priority to be fixed even if it is confirmed to be a bug.
    Thanks,
    Gordon

Maybe you are looking for

  • Windows installer not booting after boot camp partition

    I'm running OSX 10.9.4 and trying to boot camp windows 8. Everything is going right up until after the partition when the Mac restarts. It goes back to OSX and doesnt launch the windows installer.

  • Bt home hub

    I wantd to get into my 2.0 Home Hub Manager (the black home hub) to see the settings.  I have searched all over the bt site and I keep being referred back to   http.//bthomehub.home/   BUT when I type this in, I get back,   page not available, moved,

  • Sound on iPhone4S disappears at frequent intervals, no ring or sound from Apps

    Sound suddenly decides to cut out such as no alarm going off this morning! Comes back after switching off but then will happen again later. Issue was on 4G so I cahnged to partner's iPhone4S only to find it's happening again! Apple Care had suggested

  • Contribute changes not showing after site update

    A few months ago I added a top level navigation item to a client site.  That made changes to the code for every page in the site, but the changes the client had made with Contribute 4 still showed in browsers. Just posted the pages for another additi

  • HT4906 What does Photo Stream Do?

    I'm just upgrading to Mountain Lion and not familiar with all the iCloud services. What does Photo Stream do? Can you limit the photos that go to iCloud storage? Can you allow some pics to be seen by others, but not all? etc.