Dispose when jframe is minimised

hey peepz...
i want the jframe to be disposed instead of minimised when another jframe appears. i am not sure how to do it because the latter jframe or the 2nd jframe belongs to the same class but is created by different constructor. so it is something like constructor2 is being called upon when something is done in constructor1.
how do we go around doing that?
thanks
farah k.

public class whatever1 extends jpanel {
whatever2 panel1;
whatever3 panel2;
whatever1 (String variable1, String variable 2) {
whatever2 panel1 = new whatever2(variable1, panel2);
whatever3 panel2 = new whatever3( variable2, panel1);
add (jpanel1);
add (jpanel2);
whatever1 (String variable1, String variable 2, String variable3) {
whatever2 panel1 = new whatever2(variable3, panel2);
whatever3 panel2 = new whatever3( test, panel1);
add (jpanel1);
add (jpanel2);
class whatever2 extends jpanel {
JButton action1;
String variable1, variable3, variable4;
jpanel(String name, whatever3 jpanel2) {
action1.addActionListener(
public void actionPerformed(ActionEvent e) {
     dispose(); /*i want to dispose this the first frame which was generated by the first constructor but there is no such function within jpanel*/
new whatever1(variable1, variable3, variable4);
}

Similar Messages

  • Disposing a jframe, and freeing up memory

    Greetings,
    I hope this is the proper forum for memory issues.
    I have an enterprise database reporting desktop application that I am developing. The GUI application reports on a huge set of data that results in the app taking up to 125 MB worth of memory when fully loaded. There are moments in using the application that all of the data will need to be refreshed entirely, and the JFrame that reports it be reloaded in the process.
    I am wondering how to dispose the JFrame and release all of the data associated with it. I use NetBeans to develop my GUI, and so all of the data that is needed for the JFrame is a class variable of the JFrame (so the data can be accessed as it is needed). But, when the frame is disposed, I no longer need anything associated with the JFrame that gets disposed. The Javadoc for Window.dispose() seems to imply that not all of the resources will be released and GC'd when you call dispose, because it says "The Window and its subcomponents can be made displayable again by rebuilding the native resources with a subsequent call to pack or show." which to me says that the data is being remembered and not collected by the GC.
    Anyone have any tips for GUIs and memory management? It seems like any GUI app could get pretty large pretty fast if there's no way to release the data associated with the GUI.
    Here's the code I've tested that doesn't seem to be releasing the memory (stress tests of closing and re-opening the window multiple times shows the java.exe process eating more and more memory):
        public void reset(){
            this.dispose();
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new PartsDashboard(partNum, dateFrom, dateTo);
            try{
                this.finalize();
            } catch (Throwable t){
                t.printStackTrace();
        }Thanks in advance.

    Three things you can always count on in life: Death, Taxes, and AndrewThompson64 telling people to post an SSCCE. =)
    Just poking fun.
    Anyways, this problem has gone from probably-should-deal-with-soon to critical issue. Here is the SSCCE to illustrate the problem. NOTE: My client is using Windows and I am using Windows, so how this acts on Linux/Mac isn't important to me. Also, a few of my client's machines are not well equipped (512 MB RAM), so they have agreed to up their hardware a bit.
    But the big problem, on my end, is that disposed windows DO NOT free up resources once disposed. My program is very data-heavy. I have considered grabbing less data from the database but this would mean the program would have to go to the database more often. The ultimate dilemma of time vs space, essentially.
    To explain the SSCCE: There is a main window with a button. If you click the button, it launches another window with a String array that is 500,000 items large (to simulate a lot of data), and a JList to view those strings. Closing the data-heavy child window does not free up the memory that it uses, and if you launch a bunch of the child windows in the same program instance (close each child before launching a new one) then you will see the amount of memory piling up.
    Am I doing something wrong? Has anyone else experienced similar problems? Does anyone have suggestions? Thank you.
    import java.awt.Dimension;
    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JList;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    * @author Ryan
    public class MemoryLeak {
        public static void main(String[] args) {
            // Launch Base Frame
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new BaseFrame().setVisible(true);
    class BaseFrame extends JFrame{
        public BaseFrame() {
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            setPreferredSize(new Dimension(300,300));
            JPanel panel = new JPanel();
            panel.setLayout(new FlowLayout(FlowLayout.CENTER, 150, 5));
            JButton button = new JButton("Launch Data-Heavy Child");
            // JButton will launch Child Frame
            button.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    java.awt.EventQueue.invokeLater(new Runnable() {
                        public void run() {
                            // Notice no references to ChildFrame, period.
                            new ChildFrame().setVisible(true);
            panel.add(button);
            add(panel);
            pack();
    class ChildFrame extends JFrame{
        public ChildFrame() {
            setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
            setPreferredSize(new Dimension(300,600));
            JPanel panel = new JPanel();
            panel.setLayout(new FlowLayout());
            // Simulate lots of data.
            String[] dataArr = new String[500000];
            for(int i = 0; i < dataArr.length; i++) {
                dataArr[i] = "This is # " + i;
            // Something to display the data.
            JList list = new JList(dataArr);
            JScrollPane scrollPane = new JScrollPane(list);
            scrollPane.setPreferredSize(new Dimension(200, 550));
            panel.add(scrollPane);
            add(panel);
            pack();
    }

  • Firefox 4 is not appearing in Task bar or some times it is Disappearing from task bar when i am minimising the window. so, i had to go to Task manager and find the icon.Its becoming big messy if tabs are not found , to switch programmes.

    firefox icon is missing from "Task bar"when i am minimising the window

    I am unwilling to attempt navigation away from these sites. The pop-ups that occur on the attempt to leave a site or to close the browser are exit traps offering incentive to stay.
    Once upon a time, when the internet was less dangerous, I would be willing to close the exit pop-ups. Now, after twice being infected with malware trying to close the pop-ups, I now force close whichever browser I am using.
    Recently, I clicked on the red X to close one pop-up, and it installed a trojan that I had to pay to be removed. When I clicked on 'Leave' in another exit pop, it didn't exit and it turned out I was giving permission to run a script file. Now that criminals have learned these exit pop-ups can be used to force a click action, the sites using them have become dangerous.
    If I force the browser to close using Task manager, Please tell me how to stop FireFox from sending me directly back to the same site because it mistakenly believes it crashed when it did not. I forced it to close because I was on a site that had taken control of my browser and was not allowing me to leave the site.
    No other browser sends me back to the potentially dangerous sites. I prefer Firefox, but the new version must have a setting that allows me to get safely away from a problem site?

  • Cant dispose a JFrame

    hi
    i'm having a problem with jFrame disposion. i have a login JDialog, that launches JFrame. After logoff - the same JDialog appears. And when i call JFrame again - i get 2 flashing frames, that are disabling/enabling one another, and swithing from one to another. after some accurate clicks in taskbar - forms stop flicker, but i still have 2 of them.
    then you may try to logoff and login again from one of them - and guess what - i get 4 flikering frames. dammit.
    how to completely dispose Frame?
    tryed everything in forums with keyword "dispose". no luck.
    many many many thanx.

    I presume your are calling frame.dispose() from your Dialog window, and not trying to be clever by calling it in your finalizer? Additionally, you could setframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

  • Why my system tray application terminates when JFrame is closed???

    Hi,
    I am using JDK 1.6 with Netbeans 5.5 and currently trying to make an system tray application. I have one main class which runs as a system tray application and one JFrame class which will be shown when user selects a menu item from system tray. So far so good but a small problem. When the JFrame form is closed, my system tray application also closes. Can somebody tell me what am I missing?
    Thanks

    set the DefaultCloseOperation of the JFrame to DISPOSE_ON_CLOSE instead of EXIT_ON_CLOSE
    db

  • Auto-scrolling doesn't work when JFrame is not visible

    Hi, I have auto-scrolling implemented for my JTextPane that sits in JScrollPane - which lives in JInternalFrame. It works as excepted - as long as my application's JFrame is visible. When the JFrame becomes invisible, auto-scrolling simply doesn't work anymore.
    I've overcame this by scrolling down in "windowShown", but it's ugly because the user can visually see the scroll down when using this workaround (it jumps).
    I guess this is Swing's optimization, but I would really like to overcome it in someway. But it seems I'm not enough a swing hacker to do it.
    One thing to note is thtat, the auto-scrolling works fine when the JInternalFrame is NOT visible, but frame is.
    I've tried to override the isShowing-method of JInternalFrame, with no luck.
    Here's my scrolling method:
    public static void scrollDown(JScrollPane scroll) {
              JViewport port = scroll.getViewport();
              Rectangle rect = new Rectangle(0, port.getViewSize().height, 1, 1);
              port.scrollRectToVisible(rect);
              JScrollBar bar = scroll.getVerticalScrollBar();
              bar.setValue(bar.getMaximum() - bar.getModel().getExtent());
         }Anyone have ideas?

    At some point I had really hard time getting the auto-scrolling to work, as I got these weird little bumps after scrolling down.
    Adding scrollBar.setValue() seemed to 'just fix it'. It actually seems to be superfluous now.
    The scrolling is already wrapped in SwingUtilities.invokeLater() - in conjuction with printing text into the JTextPane and it works OK.
    I had some wrong info in the first post, the viewport actually does get scrolled down even when the JFrame is not visible. And by visible I mean JFrame.setVisible(false) - my application has a minimize-to-tray feature, which hides the JFrame.
    So I think the problem is 'just' a repainting problem. When the frame is shown, the previous scroll location is first displayed, and then a repaint is triggered that causes the 'jump down'.
    I'm not still sure how to fix it though.

  • Execute instructions when JFrame is closing

    Hi,
    I have a JFrame and I want to save some information (using java.util.prefs) when the user closes it.
    How Do I execute some instructions when an user closes a JFrame?
    Thank's!

    You could write a window listener: http://java.sun.com/docs/books/tutorial/uiswing/events/windowlistener.html
    Or use a shutdown hook: http://java.sun.com/javase/6/docs/api/java/lang/Runtime.html#addShutdownHook(java.lang.Thread)
    I think the window listener usually makes more sense.

  • Resizing Image when JFrame resized?

    I have a JFrame with a JPanel added to the contentPane (BorderLayout.CENTER). In the JPanel is a JLabel (BorderLayout.CENTER) with an ImageIcon set to it. The image is a subimage of a larger image whose width is scaled to fit the current JLabel width (which is dictated by the JPanel width and finally dictated by the JFrame width).
    When the user resizes the JFrame, the image of the ImageIcon should be replaced with a new image which has been scaled to fit the new width and that reflects the new portion of the larger source image that is visible.
    The JFrame already has a ComponentListener added for retaining the current JFrame size and screen position, but calling my resizeDisplay() method from componentResized() does not seem to have the updated JLabel size. I have added a ComponentListener to the JLabel and called my resizeDisplay() method from componentResized() but it does not seem to have the updated JLabel size either.
    How can my application properly react to JFrame resizes so that the method is retrieving the new size values?
    Thanks,
    Robert Templeton

    Its always easier to solve a problem when sample code (not a complete program) is posted with the question.
    Maybe I don't understand the question, but when I run the following code the output reflects the size of the label after it has been resized. I'm using JDK1.3 on Window 98.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.text.*;
    public class TestLabel extends JFrame
         public TestLabel()
              JPanel panel = new JPanel();
              setContentPane( panel );
              panel.setPreferredSize( new Dimension( 200, 200 ) );
              panel.setLayout(new BorderLayout() );
              final JLabel myLabel = new JLabel( new ImageIcon("dukeWaveRed.gif"), JLabel.CENTER );
              panel.add( myLabel );
              myLabel.addComponentListener( new ComponentAdapter()
                   public void componentResized(ComponentEvent e)
                        System.out.println( myLabel.getSize() );
         public static void main(String[] args)
              TestLabel frame = new TestLabel();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setVisible(true);
    }

  • Action when JFrame is closed

    Ok, i want to perform some action (defined in function close() ) when the user closes a JFrame. Its not happening for me, though...
    frame.addWindowListener(new WindowAdapter(){
            public void WindowClosing(WindowEvent e){
                 close();
    });WindowClosed(WindowEvent e) aint working either.
    While im here, i have another question thats is bugging me:
    How come things like
    Image img=jpanel.createImage(600,400);
    Graphics g=img.getGraphics();Often return null?

    Encephalopathic wrote:
    prolly need to use @Override to prevent this from biting your again.
    and we're 100+ in NC. I'm sitting here as they work on the broken air conditioning unit.Meanwhile, out west: [snow at elevations...|http://www.theweathernetwork.com/index.php?product=weather_cams&placecode=cabc0149&pagecontent=weather_cams&camregion=canada&camera=CMBC0030]

  • Data controls not working when JFrame is not used

    Hi
    I try to use JInternalFrame for my applications and drag and drop stops to work as soon as I change JFrame to JInternalFrame and make code.
    andirus

    Andius,
    JInternalFrame support will be added to JDeveloper 10.1.3. For now, because its only a design time limitation, you could build your frame with JFrame and then turn it into a JInternalFrame.
    Frank

  • NullPointerException when JFrame.setVisible is called

    Hi,
    We are upgrading our app from JDK 1.2.2 to JDK 1.4.
    App used to work fine with JDK 1.2.2. Now it throws a
    NullPointerException on one of the calls to JFrame.setVisible
    method. Here is the error:
    java.lang.NullPointerException
    at javax.swing.text.PlainView.getLineWidth(PlainView.java:612)
    at javax.swing.text.PlainView.getPreferredSpan(PlainView.java:211)
    at javax.swing.plaf.basic.BasicTextUI$RootView.getPreferredSpan(BasicTex
    tUI.java:1167)
    at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:
    737)
    at javax.swing.JComponent.getPreferredSize(JComponent.java:1262)
    at javax.swing.JTextArea.getPreferredSize(JTextArea.java:606)
    at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:76
    7)
    at java.awt.Container.layout(Container.java:980)
    at java.awt.Container.doLayout(Container.java:970)
    at java.awt.Container.validateTree(Container.java:1048)
    at java.awt.Container.validateTree(Container.java:1055)
    at java.awt.Container.validateTree(Container.java:1055)
    at java.awt.Container.validateTree(Container.java:1055)
    at java.awt.Container.validateTree(Container.java:1055)
    at java.awt.Container.validateTree(Container.java:1055)
    at java.awt.Container.validateTree(Container.java:1055)
    at java.awt.Container.validateTree(Container.java:1055)
    at java.awt.Container.validate(Container.java:1023)
    at java.awt.Window.show(Window.java:455)
    at java.awt.Component.show(Component.java:1128)
    at java.awt.Component.setVisible(Component.java:1083)
    at com.teoco.events.EventViewerFrame.setVisible(EventViewerFrame.java:29
    7)
    at com.teoco.events.EventViewerFrame.display(EventViewerFrame.java:185)
    at com.teoco.ImportGUI.Desktop.initializeApplication(Desktop.java:654)
    at com.teoco.ImportGUI.Desktop.initializeApplication(Desktop.java:639)
    at com.teoco.ImportGUI.Desktop.<init>(Desktop.java:310)
    at com.teoco.ImportGUI.Desktop.<init>(Desktop.java:337)
    at com.teoco.ImportGUI.Desktop.main(Desktop.java:1197)
    I cannot figure out what could be causing this problem.
    Any help is appreciated.
    Thanks
    Jitendra

    Hi Denis,
    Thanks for the bug link you provided. I looked at the bug they were talking about, it looks similar to what is happening to me, but they were talking about Solaris and Linux. Our app runs on Windows and the report says they did not test the fix on Windows.
    Jitendra

  • Dreamweaver CS5.5 Slow down when minimising and loading pages.

    Hi there
    I'm having a really strange problem with Dreamweaver CS5.5
    I'm currently in the process of building a CMS for a client and I am experience slow down in Dreamwever when opening and closing certain pages, it also causes slow down/hanging when opening and minimising Dreamweaver itself if these certain pages are open at the time. Which starts to get very annoying when you're swapping between Photoshop and Dreamweaver all the time...
    I narrowed it down to a CSS file causing the slow down/hanging. This being the main stylesheet for the CMS... admin.css
    When I comment out the CSS file Dreamweaver minimises and maximises quickly, and the page in question opens fast.
    The stylesheet is about 900 lines long at the moment, but I've got php and javascript files (and also other CSS files) which are much longer and none of them cause slow down/hanging.
    I've looked myself but from what I can see all of the CSS is valid.
    Any ideas guys?
    Thanks in advance

    I can't explain this at all, but I've solved it.
    I changed the style below:
    @media only screen and (min-width: 35em) {
    .ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; *line-height: 0; }
    .ir br { display: none; }
    .hidden { display: none !important; visibility: hidden; }
    .visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
    .visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
    .invisible { visibility: hidden; }
    /* Clear Floated Elements + Fix */
    .clear {clear:both; display:block; overflow:hidden; visibility:hidden; width:0; height:0;}
    .clearfix:before,.clearfix:after{content: '.'; display: block; overflow: hidden; visibility: hidden; font-size: 0; line-height: 0; width: 0; height: 0;}
    .clearfix:after {clear: both;}
    .clearfix {zoom: 1;}
    /*END DONT CHANGE*/
    To this:
    @media only screen and (min-width: 35em) {
    .ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; *line-height: 0; }
    .ir br { display: none; }
    .hidden { display: none !important; visibility: hidden; }
    .visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
    .visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
    .invisible { visibility: hidden; }
    /* Clear Floated Elements + Fix */
    .clear {clear:both; display:block; overflow:hidden; visibility:hidden; width:0; height:0;}
    .clearfix:before,.clearfix:after{content: '.'; display: block; overflow: hidden; visibility: hidden; font-size: 0; line-height: 0; width: 0; height: 0;}
    .clearfix:after {clear: both;}
    .clearfix {zoom: 1;}
    /*END DONT CHANGE*/
    Moved it outside of the media query. It was put there by mistake by the looks of it.

  • When Firefox is not minimised, there are problems with jamming sounds and FPS drops.

    Hello, I have some issues, when Firefox is not minimised. When I watch movie on my BS Player or playing World of Tanks and I have not minimised Firefox (there is a window, no matter it is maximised or just window), there are visible FPS drops, but when I minimise the Firefox window, it works just fine. Also when I connect my laptop to my sound amplifier with 2.1 speakers, I can hear a jamming, hamming and whirling, also works fine, when Firefox is minimised. Is there any way to remove this? Its quite annoying. I tried to disable all addons etc., nothing worked. Thanks.

    You can try to disable hardware acceleration in Firefox.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    You need to close and restart Firefox after toggling this setting.
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    *https://support.mozilla.org/kb/upgrade-graphics-drivers-use-hardware-acceleration

  • Need an hint on disposing a dialog.

    Hi there,
    Using: Netbeans 4.1 with the Sun JDK 1.5.0_06 on Linux.
    I recently started to study Java and so far I love it. Last evening (after my "daily tutorial section") I tried setting up a very basic program only armed with the JDK 1.5 documentation provided by Sun. The task: a dialog with "Hello World".
    Now.. I managed to come up with a very basic program using the JFrame class, and it works too:
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    public class HelloWorld extends JOptionPane {
        public static void main(String[] args) {
            JFrame frame = new JFrame();
            showMessageDialog(frame, "Hello World!");
            frame.dispose();
    }And yes, for your fun and amusement I did make the mistake of forgetting all about dispose() when I first started the critter. So far, so good. Now I want more; I read about the method "setDefaultCloseOperation(int)" which allows the JFrame to determine what to do when a user closes the window. So, after some more reading, I came up with:
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.WindowConstants;
    public class HelloWorld extends JOptionPane {
        public static void main(String[] args) {
            JFrame frame = new JFrame();
            frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
            showMessageDialog(frame, "Hello World!");
            // frame.dispose();
    }The only problem here is that it doesn't do what I expected and so far I can't put my finger on it. The user clicks 'ok', the dialog disappears and the application continues to run. Just to be sure I tried replacing the "WindowConstants.DISPOSE_ON_CLOSE" with the value 2 (found on the constants list) and even the JFrame field "EXIT_ON_CLOSE" (so instead of the constant or '2' a mere "frame.EXIT_ON_CLOSE") but nothing! I then found on the Sun tutorial "how to make frames" the example "frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);" which I then tried but I got the same results.
    So my questions are basicly:
    Could anyone hint me where my thinking goes wrong ? I'm not looking for ready made solutions, but trying to understand whats up here.
    Second: I read that this is an extension with JFrame and is not found on Frame. Would my conclusion be right (not only based on these experiments) that it would probably be best to keep using dispose() so that I'm not making myself dependend on specific extensions ?
    Last, but not least, in my attempts I tried using "frame.EXIT_ON_CLOSE". Isn't that basicly equal to my "JFrame.EXIT_ON_CLOSE" ?
    I am probably going to hate myself for that last question since I can't help feel having missed something obvious from the tutorials (which I'm going to re-read later on) but alas..
    Thanks for any input.

    if you do this
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);and you only have one frame, then when you close that frame it effectively is a System.exit(0); and a call to dispose() is unnecessary.
    however, when a frame is created, there are listeners created(among other things) that hold a reference to the frame. if your application has multiple windows and you want to close one of them without exiting the application, then you need to call dispose(). this "disposes" of all the things in the background(trying not to be too technical) and allows the frame and all associated "stuff" to be garbage collected. In this case, you would want to add a window listener and call dispose() in the windowClosing() method.
    this is a very simplistic explanation but I think it's appropriate not to get into too much detail at this point. you should be able to find some good reading material about this with a Google search.
    kind regards
    walken

  • JFrame displays without its components or settings (please help)

    On clicking a button in an app, due to computational time required, I need to have a message popup that says 'Please Wait', which vanishes on end of needed computation. For this, I have a small working class MsgDiag that simply displays a non-modal titled JFrame showing a message string in a JLabel and an 'ok' in a JButton. This works fine when invoked directly via its own main method as a standalone, but when called from that other application(also a extended JFrame) via button click, it just brings up a blank grey untitled JFrame without the components (JLabel and JButton) or the background color! It does stay up for the required duration and vanishes on disposing its JFrame as expected but why blank w/o components or settings ?
    I also find that though the JFrame component comes up blank grey, if during the computation portion in calling application, if any info/errors are popped up via direct call to a JOptionPane().showMessageDialog(JFrame(),msgString, titleString, msgType), then along with that modal popup (from JOptionPane), the grey JFrame gets correctly drawn with components and background !
    Does this provide any hints ? Since MsgDiag works ok by itself I am puzzled.
    I also tried putting basic code from MsgDiag (creating JFrame, adding its components, setting it visible etc) into the other app directly but same grey blank frame results. Had there been a non-modal JOptionPane I could have tried using it. I use JRE 1.4.2

    Per your suggestion, I tried putting computational part in a different thread. Also tried putting the thread priority for computational thread to lowest.
    In other approach, also tried putting the GUI popup (frame2) in a separate thread with highest priority while lowest priority computational thread executed. But neither approach worked. Still shows frame2 as blank w/o background or components inside while low priority computational thread finished, when frame2 gets disposed as instructed.
    In 1st approach, also tried adding validate() following setSize() as some other posts have suggested but that did not change anything. Any other pointers ?

Maybe you are looking for

  • How do I get Special character Euro symbol € to display ?

    Hi, How do I get the euro symbol € to display in Flash from PHP file created in DW ?. It does not display it properly. I have simplified the PHP code I have is: <?php $msgtoflash = "This is the Euro Symbol &#8364"; print ("&Databaseinfo=$msgtoflash")

  • Product Registration Pop

    I have a pop up reminder on the PC for the first time today to "register product and enjoy a host of benefits" - how can I get rid of it please - I've already registered and I thought it would be as simple as deleting the product registration link fr

  • Network Printers Loading Slow

    Hello, I am an IT technician working on a remote desktop/terminal server running Windows Server 2008 R2. I have run into a problem recently where a user's network printer connections are taking a long time to load, some times up to five minutes after

  • What happened to my history after upgrading to os i6

    I upgraded to ISo6 for my ipad.  Now I o longer have my "history" on my web page visits.   How do I get that back?

  • Multiple pl/sql expressions for a conditonal process

    Can I put multiple pl/sql expressions in the expression one box? I want run a process on conditions that posts an update when the user has checked a box that was not previously checked. looks something like this: when (p1_checkbox1 = 'Y' or p1_checkb