JWindow displaying sporadically

I have a method that creates a JWindow and displays it, it works when I call it from my main method, as well and a few others, however when I call it from some, it displays just a white box where my JWindow should be, any have any ideas?
I the method I am using to open the JWindow is as follows:
private static void showLoader(){
JWindow loadscr = new JWindow();
loadscr.getContentPane().setLayout(new java.awt.FlowLayout());
loadscr.getContentPane().add(new JLabel("Loading..."));
loadscr.pack();
java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
loadscr.setSize(new java.awt.Dimension(239, 105));
loadscr.setLocation((screenSize.width-239)/2,(screenSize.height-105)/2);
loadscr.show();
Thanks
Jeremy

I had the same problem and solved it this way.
(The problem occurred with JWindow in a Linux-KDE environment, jdk 1.3)
java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
w.setLocation((screenSize.width-500)/2,(screenSize.height-300)/2);
ImageIcon icon = new ImageIcon("...");
w.getContentPane().add(new JLabel(icon));
*     pack() before the probable reSize()
w.pack();
w.setVisible(true);
w.show();
* I had to call the show() method in addiction (I haven't tried in substitution of) setVisible(boolean)
* Most of the times the pack() method sets JWindow height and width == 1
if (w.getHeight()==1){
w.setSize(icon.getIconWidth(), icon.getIconHeight());
w.repaint();
I read the problem should be solved in jdk 1.4
Fabio Di Donato

Similar Messages

  • 30" LCD Cinema display - sporadically blanks out, need to restart Mac Pro

    2007 vintage 30" LCD Cinema HD display running off a Mac Pro with an ATI Radeon X1900 XT. Was Mac OS 10.5.latest, just upgraded to 10.6.4 with no effect on the problem.
    This has happened perhaps 8 or 10 times over the last few months, and IIRC always when I'm playing WoW. I know WoW heats up my Pro more than anything else because I can hear the cooling fans speeding up when I load and play it.
    The symptom is the screen goes totally black. The little white light down the bottom-right of the display comes on. If I push the power button on the display the white light goes bright, but there's no other reaction. The capslock light on the keyboard still reacts so I know I don't have a total system hang.
    I shut down the whole Mac Pro by holding in its On button for 10 seconds, and it powers down as normal. But the white light on the display is still on, and I have to disconnect the power from the display so the white light goes off; only then I turn the Pro back on and all is well again.
    The screen always gets very warm to the touch - I can hold my hand on it OK so it's not burning hot but it still seems too hot to me. Is this normal for this screen? It seems a little odd there are no cooling vents if so. Having just restarted iStat Pro says Mac HD (I think that's the display) is 46c, CPUs and everything else 40c or below. It is coming on for summer here but today is not hot, iStat says ambient is 23c.
    So what am I asking for? I guess some sort of validation of my issue, advice, and where I should start diagnosis - display, video, display power, the Mac itself ... or should I just get Apple out here? I do have Apple Care.
    Thanks all.

    And it's happened twice since then, both while playing WoW. After the latest reboot my temps are 49c for display, 45c and 48c for CPUs. The Mac has been on for over 6 hours before I ran up Wow with no problem, in Wow for maybe 5 minutes and there it goes.
    The latest Mac updates to iTunes 10.1 and OS 10.6.5 were applied a few hours ago, well before this latest crash.
    My best guess is that either some component has gone temperature-intolerant that didn't used to be, or there is something in the latest WoW version that is triggering some hardware, driver or OS problem. I really don't have much of an idea where to go now. Any suggestions?

  • White screen displays sporadically during interactive content and not for all users

    We have an unusual thing happening with some users (5% or less) experiencing a white screen/program lockup when interacting with the training.  We think this is related to missing java script file(s), but we aren't 100% sure.
    Training is occurring on a variety of different laptops and workstations across the country.  All are suppose to be using the latest version of IE (and java).  There is no commonality between hardware, users or where in the program the issue occurs.
    Some people experience it in module 5 when they have to type data, and others may experience it in module 2 where they just have to click the continue button ( any module for any action - it truly is that random).  What's more we can't reproduce the problem on machines that have the latest java files.  We have looked over the physical layout of each slide but can find no commands or objects that would cause the problem.
    Has anyone experienced this type of sporadic issue?  Does anyone have a suggestion for how to fix it? -
    Any insight or advice would be greatly appreciated, Debra

    think they blocking us all and not telling us why think they have manger problems with new cloud atm im useing a  stand alone portable phtotoshop cc till they get it fix .

  • Can a laptop with VGA output use the Apple Thunderbolt 27" display?

    I bought a 2011 Macbook Air and I'm thinking about upgrading my office monitor. The new Apple Thunderbolt 27" display comes to mind.
    However, I also have a Lenovo X201 with VGA output, which I would also like to connect to the Apple Thunderbolt 27" display sporadically.
    Will the VGA to mini-display port adapter work? If not, does there exist a VGA to mini-display port converter that will work and if so which one?

    You are thinking of that adapter backwards.  It is not VGA to MDP but is "Mini DisplayPort to VGA Adapter".  This means it will take video out of a a MDP connection and convert it to a VGA connection.  It will not go the other direction like you need.
    Sorry but that Lenovo just doesn't have the ability to connect to the new display.  If it had a HDMI video port like some other Lenovo models, you could adapt from that but I don't know of any VGA to Mini-DisplayPort/ThunderBolt adapters.
    Even if you were to use such an adapter, the video card in that laptop couldn't drive a 27" display at the native resolution so it would look very bad.
    One other option would be to use the Lenovo X200 docking station which has a full sized Display Port.  You would have to use a Display Port to Mini Display port adapter then you could attach the TB cable to it.  There is also a USB video replicator that has a DVI-I output then then yet another adapter to get to Mini-Display.
    However, both of these options would still be limited by the graphics card at 1920x1080 so it still wouldn't look good.

  • Problem with JWindow

    Hi all,
    I have a very important question....
    I created a small application and when i launch it, i'd like to have a JWindow displayed on my screen only during 5 seconds.... So i run my application, my JWindow is displayed during 5 seconds and then the application "really" begins.
    But how do i have to proceed to have my JWindow displayed only during 5 seconds and then close automatically???
    Thanx very much for helping....

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.Timer;
    public class SplashWindow
        public static void main(String[] args)
            JFrame f = new JFrame();
            showSplash(f);
            JPanel panel = new JPanel();
            panel.setBackground(Color.red);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(panel);
            f.setSize(400,300);
            f.setLocationRelativeTo(null);
        private static void showSplash(final Component c)
            JLabel label = new JLabel("hang on, it's coming...", JLabel.CENTER);
            final JWindow w = new JWindow();
            w.getContentPane().add(label);
            w.setSize(200,200);
            w.setLocationRelativeTo(null);
            w.setVisible(true);
            final Timer timer = new Timer(5000, new ActionListener()
                public void actionPerformed(ActionEvent e)
                    w.dispose();
                    c.setVisible(true);
            timer.setRepeats(false);
            timer.start();
    }

  • Spaces Visual Glitch

    A quick summary would be that _when using the arrow keys shortcuts to switch between spaces, I get visual bugs._ (Click + hold on titlebar , then ⌘ Arrow, or ⌘⌥ Arrow.. etc)
    As I switch the app I'm holding between Spaces using this method, the HUD showing which Space it is in only displays sporadically.
    I've tried changing Spaces settings, turning it on and off, restarts etc and it still does it.
    If i use the number keys it is fine now matter how quick i change an app between spaces.
    If i use the drag method its fine.. but you can only do that slowly
    If i use the titlebar arrow keys method slowly and wait for the HUD to fade out before switching to another space its fine. (i.e move from 1 to 2, HUD shows, wait until it fades out, then move it to space 4, HUD shows)
    BUT... if i flick an app between spaces quickly the HUD only shows sporadically after the first switch. Sometimes the desktop image will flicker in front of everything for a fraction of a second. I
    I have an Alu MacBook, and it does this after a restart when there is plenty of free RAM, ~1GB. I can acheive the described glitches by doing a fresh restart and only opening a Finder window. The problem still occurs when i try to jump that around spaces quickly.

    I made a video to show more effectively what I mean.
    http://www.youtube.com/watch?v=Jq7NxNrl24s
    As you can see the HUD doesn't display all the time. I'm not hopeful for (or expecting) a solution, although I don't remember it being like that before 10.5.7. But I'd just like to find out what you think of the bug and if anyone else can get the same results.
    I do realise it is a very minor thing, albeit one that irritates me.

  • Multiple/conditional inheritance

    I know that java does not allow for inheritance from multiple classes, and I know an interface can be used to work in a similar way but I am struggling to find a solution for what I want.
    I am creating a notification system :
    A JWindow displays a JPanel which is styled (the JPanel is the skin)
    I then want another panel to be made (or series of) for the different types of notification, for instance input boxes, progress bars etc.
    My idea was that the type of panel would extend a style so that the style panel would render its appearance but the type would then render the components over the top, but because I can't inherit from a selected class at runtime, how do I get it to render the correct style?
    thanks

    Use delegation. Your classes don't need to extend any Swing classes at all. Just add a method like this:
    public JComponent getComponent();Then each style can return whichever JComponent it wants (more often than not that will be a JPanel with some additional components on top).
    There's no need for your style classes to extend the JPanel class.

  • Display image in JWindow..

    please tell me how can i display and jpg image on JWindow.

    BufferedImage img = ImageIO.read(new FileInputStream("img.jpg"));Or better yet, load it from the classpath rather than relying on the file being in a particular directory relative to where your app started.
    Change:
    new FileInputStream("img.jpg")
    To:
    getClass().getResourceAsStream("/img.jpg")
    And make sure the directory containing img.jpg is included in the classpath.

  • IPhone 4s Sporadically not connecting to 3g even though the 3g symbol is displayed.

    Hi,
    I purchased my iPhone 4s (Simfree) from the Irish online apple store back in November 2011.
    Since purchasing I was having a very annoying problem where by the phone would sporadically not connect to 3g but would display all the characteristics it was trying i.e. 3G symbol with little activity circle. The quickest fix was to restart the phone which would work again for a few days until it would happen again.
    From experience, it seemed to happen more when I went from WiFi to 3G. If I had to give a guess I would say it was like it just couldn’t make the switch from WiFi to 3g and resulted in no internet when on mobile data. Note: It always worked on WiFi no matter what)
    I tried all the usual things like restoring the phone to factory settings and closing all apps running in the background before leaving WiFi but the problem kept appearing.
    After months of trying different configs I think I’ve finally solved it.
    I enabled “Data Roaming” from settings\general\network and so far so good. The strange thing is, I shouldn’t need “Data Roaming” turned on as I don’t roam. My wife’s iPhone 4 and my last two iPhones all had this function turned off by default. 
    I decided to post this as it was so annoying; it actually took away from owning the 4s when it should be a joy to own.  I only hope this helps someone else with similier problems to my own.
    Thanks,
    Mark
    PS: Remember to turn “Data Roaming” off when traveling or you could end up for some pretty big bills

    my wife's iphone 4S has the same problem. All of sudden 3G data is no longer working and battery is draining very fast, to the point that you can see the percent points going down as you look at the phone.
    I found a solution on this forum http://www.iphoneforums.net/forum/iphone-help-15/4s-data-not-working-3g-23911/ that seems to fix the data problem at least. Don't know about the battery problem as I have just applied the fix.
    I read on the Apple discussion forum about a quick easy fix that the German T-Mobile is telling their customers to do to circumvent this Apple software issue. The phones affected are apparently only the 4S with OS 5.0.1 (9A405). This fix works for about 80% of the 4S phones that have this problem.
    Go to:
    Settings>Phone>Sim Pin>Sim Pin Off.
    You may have to reboot the phone for the change to take effect. The change works on my phone. Good luck. And thanks for nothing, Apple.

  • How to display cusomized custom tooltip(jwindow)  in jtable cell position

    Hi,
    i am trying to display custom tooltip for jtable cell. i created custom tooltip(jwindow) and on mouseover of jtable cell i am trying to display the custom tooltip.
    But it is not display the position of jtable cell. How to display the exact position of jtable cell
    please help me on this.

    Did you read the posting directly below yours which was also about a custom tool tip?
    JScrollableToolTip is buggy
    The code presented there shows the tool tip in the proper location.
    For more help create a [url http://sscce.org]SSCCE, that demonstrates the incorrect behaviour.
    Don't forget to read the "Welcome to the new home" posting at the start of the forum to learn how to use the "code tags" so posted code is formatted and readable.

  • Firefox sporadically won't display flash embedded within a web page.

    I have Fiorefox 28.0, running on a Mac with Mavericks 10.9.2. Sporadically, Firefox won't display an embedded flash video. I tried running Firefox in Safe Mode (all add-ons disabled). Same thing occurs - won't display the embedded flash on some webpages.
    Here is an example webpage in which this problem occurs:
    http://www.deadline.com/2014/04/nbcs-jimmy-fallon-and-seth-meyers-welcome-stephen-colbert-to-cbs-video/
    I couldn't determine how to attach a file of a screen grab or I would have done so.
    Thanks.

    I can't tell how far the player gets in loading. All I see is a blank white block of space where the player would normally be loaded. I used the term 'embedded' as that seemed the correct term to use. If incorrect, that's only due to my unfamiliarity with the correct terminology of having a flash video within a web page. BTW, I neglected to mention that the same page that Firefox has problems with is displayed fine in Safari. Screen grab attached showing blank space where Safari displays a functional plug-in.

  • I've bought an Iphone 4S in the UK. Using the phone in Argentina, it displays the "No Service" and "Invalid SIM" errors sporadically. The only solution is to reset the phone (switching it ON/OFF). Any suggestions?

    I've bought an Iphone 4S in the UK. Using the phone in Argentina, it displays the "No Service" and "Invalid SIM" errors sporadically. The only solution is to reset the phone (switching it ON/OFF). Also most of the time, the SMS are not sent nor received...
    The phone was checked by my carrier (phone company, Movistar) and they replaced the micro SIM card. bear in mind that there's no Apple shop here and the Iphone 4S is NOT available in Argentina!!!
    Any suggestions?

    Dear all,
    (THIS CONCERNS MTC TOUCH CUSTOMERS IN LEBANON)
    I've received an email with a solution to the problem; you have to update to the new iOS 5.0.1 firmware (9A406)!! It's been 1Hour and so far my iPHone 4S is working just fine. Please follow carefully the below instructions:
    RUN A FULL BACK UP BEFORE DOING ANY OF THIS
    1. Download the new iOS 5.0.1 firmware (9A406) from the internet. (800MB)
    2. Connect your iPhone 4S to iTunes.
    3. Once connected, two options will show: ‘restore’ and ‘check for update’.
    4. Press down SHIFT and choose ‘check for update’. (if you click ‘check for update’ without pressing down SHIFT doesn’t work.)
    5. Select the new firmware (9A406). Note that the file should be renamed ‘iPhone4,1_5.0.1_9A406_Restore.ipsw’  (instead of ‘iPhone4,1_5.0.1_9A406_Restore.zip’), i.e. changing the file extension from ZIP to IPSW. iTunes will now work alone and update your iPhone 4S.
    A full back up is recommended before firmware upgrade.
    HOPE THIS HELPS

  • How do I fix these sporadic display crashes aka the blocks of doom... ?

    *It happened about 3 weeks ago. I was on the Quickitime movie trailer site, watching the trailer for Batman. Then something funny (or not so funny as it turns out) happened. Random horizontal blocks started to appear on the screen, fragmenting the whole display over the course of a minute.*
    *I turned the power off with the power button (I couldn't see enough to reboot from the menu). Counted to 100 and powered up. To my initial horror the grey (and for my American friends 'gray' ) apple starting up splash was still scrambling with scary blocks. However, when it went to the blue screen start up screen, my MacBook Pro clicked and whirred a bit and the fault seemed to repair itself.*
    *It has done this again a couple of times more since, on average once a week over a 5 working day period. There is no pattern to this occurring, it is completely random and can hit at any time. There doesn't seem to be any permanent damage done, apart fro the fact that the crash and subsequent reboot forces me to lose all the stuff I am working on since the last save, which is an obvious pain in the hard drive.*
    *Bad Mac!*

    I am taking it today to show it to a 'Mac Genius' (I think it's one of those awfully nice college students in the fancy tees-shirts, kind of like shop assistants) Apparently they all hang round their own little bar down there (definitely college students). They will look at it for FREE for 15 minuets, and then I have to start tucking crinkled notes of currency into their clothes.

  • Mac Mini + A1038 Cinema Display does not work

    Hi,
    I have a 2009 model Mac Mini with mini-dvi and mini-display port's on the rear. I can connect any of my DVI based monitors to the mac mini using either the mini-dvi to dvi cable or the mini-displayport to dvi cable. All monitors except for the A1038 model Apple Cinema Display.
    The cinema display works with 3 other computers with DVI ports, turns right on and is detected right away. When plugged into the mini it does nothing. Sometimes I can get it to work with the mini-dvi to dvi adapter but that is sporadic.
    This is the same behavior with a 2009 model mac book pro and macbook. Using the mini-displayport to dvi cable the cinema display does not work but 3 other monitors do.
    So my question is, why does apple hardware only work with non-apple hardware?

    Is the A1038 the old, plastic Cinema Display that doesn't have a power cord or power supply? It only has a video cable with the special ADC on it? If that's the case, it needs this to run from a newer Mac:
    http://store.apple.com/us/product/M8661LL/B

  • 24" iMac displaying small green lines

    I'm having a big problem with my iMac 24" when I'm using Aperture or iTunes music videos in full screen mode.
    I am getting groups of little green lines about an inch long and a pixel or two deep, stacked in groups of five or six on top of each other like a small wavey flag. These little "flags" are spread all over the display and make for one annoying interuption of either the video I'm watching or the photos I'm editing in Aperture.
    Sometimes when I'm scrolling through my shots quickly in Aperture the lines become much larger and then red and blue blocks of lines appear, they disappear again when I give the scrolling a rest for a minute or so.
    I'm using 2Gb RAM, the 9600 graphics card and all my software is bang up to date.
    Any ideas any one?
    John
    Cheers
    iMac 24'   Mac OS X (10.4.8)   2GB RAM, 256Mb,

    Clean erase and reinstall to factory conditions did not help with the graphic corruption/glitches.
    Here are the actions I've performed so far:
    •Got iMac on Tuesday (three days ago) and proceeded to immediately install all updates, including the EFI 1.1 firmware update
    •Installed Aperture, the problem started showing itself sporadically
    •As I imported more and more Aperture projects the problem started getting more widespread, it started showing up in Dashboard (problem is equal on both internal and external monitors)
    •World of Warcraft started showing the flags/squares/lines in the menus, as well as major geometrical corruption in the 3d views (planes intersecting the world, characters warping, etc.)
    •Reset SMC (unplug all cables, wait 15 seconds, plug back in without holding power button)
    •Reset PRAM/NVRAM (several times)
    •Ran without any software in background
    •Ran Memtest (5-pass, single user mode for max available RAM) all tests passed
    •Ran Apple Hardware Test three times, once the standard test, twice the extended, none show any errors
    •Wipe drive, reinstall from restore discs, no updates installed whatsoever, no additional software installed, and it still exhibits the error inside of PhotoBooth, just as it did before, and just as it did for Janet in the post I link to above. PhotoBooth seems to show the most artifacting when the effects are turned on.
    I'm taking it in tonight, we'll see what they say. I will keep this thread updated with my actions and any responses I receive.
    One thing I feel I should mention is that I don't think it's Aperture's fault. It's just the main indicator for us since we all use it and it makes heavy use of the GPU.
    Also, my problem started out small and got bigger over the 2/3 days I was using the machine, indicative of a developing hardware issue. If it was a software glitch, it would be less likely to behave that way.

Maybe you are looking for