Results 1 to 2 of 2
  1. #1
    frintocf is offline Member
    Join Date
    Sep 2011
    Posts
    3
    Rep Power
    0

    Default Blank window for the application ( after upgrading to java 1.6 )

    Hi,

    After launching /connecting to the application shows a blank window however it worked fine with java 1.5. I think few methods have been deprecated and guess it should be something to do with repaint, refresh, setvisibility.

    The screen shows up after clicking on some other icons on the same screen.

    I have pasted below part of the code...

    public void showWindow() {
    if (ready) {
    // set window locations
    if (parent != null) {
    expertFrame.setLocation(parent.getLocation());
    if (allowWizard) {
    wizardFrame.setLocation(parent.getLocation());
    }
    } else {
    Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
    Rectangle rect = expertFrame.getBounds();
    expertFrame.setLocation((screen.width - rect.width)/2, (screen.height - rect.height)/2);
    if (allowWizard) {
    wizardFrame.setLocation((screen.width - rect.width)/2, (screen.height - rect.height)/2);
    }
    }
    // show window according to mode
    if (!allowWizard) {
    if (wizardFrame != null && topPanelWizard != null) {
    wizardFrame.getContentPane().remove(topPanelWizard );
    }
    expertFrame.getContentPane().add(topPanelExpert, BorderLayout.NORTH);
    topPanelExpert.repaint();
    expertFrame.repaint();
    expertFrame.setVisible(true);

    } else {
    if (wizardStartup) {
    wizard = true;
    wizardPanel.refreshScreen();
    wizardFrame.getContentPane().add(topPanelWizard, BorderLayout.NORTH);
    topPanelWizard.repaint();
    expertFrame.setVisible(false);
    wizardFrame.setVisible(true);
    } else {
    wizard = false;
    expertPanel.refreshScreen();
    wizardFrame.getContentPane().remove(topPanelWizard );
    expertFrame.getContentPane().add(topPanelExpert, BorderLayout.NORTH);
    topPanelExpert.repaint();
    wizardFrame.repaint();
    expertFrame.setVisible(true);
    wizardFrame.setVisible(false);

    }
    }
    }
    Last edited by frintocf; 02-15-2012 at 06:03 AM. Reason: Additional Information

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,329
    Rep Power
    25

    Default Re: Blank window for the application ( after upgrading to java 1.6 )

    Can you make a small simple program (SSCCE) that compiles, executes and shows the problem for testing.
    Hard to do that with code segments.
    Please wrap the code in code tags to preserve its formatting

Similar Threads

  1. Java application as window service
    By sijitg in forum Advanced Java
    Replies: 2
    Last Post: 09-06-2010, 10:06 AM
  2. Problem in Upgrading the RFT version 8.1.1
    By anandarora in forum Eclipse
    Replies: 0
    Last Post: 07-26-2010, 10:16 PM
  3. upgrading each java upgrade?
    By j2me64 in forum Forum Lobby
    Replies: 2
    Last Post: 02-27-2010, 02:38 PM
  4. Replies: 2
    Last Post: 04-06-2009, 05:52 PM
  5. How to hide a window of application
    By Jktu in forum AWT / Swing
    Replies: 4
    Last Post: 10-29-2008, 06:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •