Applet, splash screen an JButton

Hi,
I have an applet that only contains a JButton in order to connect a host. When you click the JButton, the connection begins and during this time I want to display a splash screen that is removed or hiden when the connection has achieved.
For this, I created a JWindow that is created in a thread as many others Java developers do.
The problem is that is done in the JButton actionPerformed() method and therefore, I never see my JWindow (only its shape) during this connection.
Is there anybody out there who would know how to do that ?

In order to get stuff to paint properly.
In your action performed pop up your Frame/Window. Let the frame then start the thread. Pass the frame instance into the thread object for callbacks such as progress bars, or if you want to rotate graphics. When the thread is finished, have it callback to the frame and tell it to dispose.
Good Luck
z.

Similar Messages

  • How can I customize the Java Report Panel applet splash screen?

    Has anyone found a quick and easy way, either via javascript or a webi properties file, to cutomize the splash screen for the Java Reporting Panel applet while it is loading?  I've found a few code snippets for the javascript approach, but they don't quite work, and apparently there's a webi properties file that I should be able to use to accomplish this, but where is it exactly?  Is it on the BO server, or should it be in a jar file in my project.  Can't seem to find it.  Thanks for any help.

    Look at the link I posted, you aren't double buffering correctly.
    I saw the other post you mistakenly made before you edited it. Not really a big deal, I was just wondering why you did that.

  • Display splash screen while downloading applet jar file

    I've tried to search the forums, but most results I get are how to display a splash screen while the classes are loading. Unfortunately, the classes do not begin loading until after the jar file has been downloaded. How does one go about showing as splash screen as the jar file containing the classes is downloaded?
    Thanks for the help!

    "Java 5 provides a capability in this area"- Unfortunately, due to circumstances out of our control we are stuck on java 1.4.x.
    "How you do that is your problem."- I'm so glad I can count on the helpful java community. Thanks.
    Since it appears that "warnerja" is discusted by my question (mabye had a bad day) and is leaving me out in the cold, does anyone have any ideas on how I can implement her/his suggestion. I can break my jar file into multiple seperate jars and as each one loads I can update a progress bar. Unfortunately, I do not know where to begin with this code wise nor do I know if this is the best solution to this problem. I would think this to be a common problem.
    Thanks for your help!

  • Java 1.5 Update 6 Splash Screen

    I have a client who operates in a dark space and does not want bright white backgrounds or white splash screens. It is easy enough to use BGCOLOR="black" in the body tag of the applet containers. However, the Sun animated splash screen logo is my last challenge. I don't want to get rid of it so much as I want to color it a dark shade of grey or black. Anyone know if it is possible to darken the color of the background on the "Java Loading" splash screen ?

    You may have video problems. Check for the most current video driver version (from the video card provider, not the computer supplier.)

  • Useful Code of the Day:  Splash Screen & Busy Application

    So you are making an Swing application. So what are two common things to do in it?
    1) Display a splash screen.
    2) Block user input when busy.
    Enter AppFrame! It's a JFrame subclass which has a glass pane overlay option to block input (setBusy()). While "busy", it displays the system wait cursor.
    It also supports display of a splash screen. There's a default splash screen if you don't provide a component to be the splash screen, and an initializer runner which takes a Runnable object. The Runnable object can then modify the splash screen component, for example to update a progress bar or text. See the main method for example usage.
    It also has a method to center a component on another component (useful for dialogs) or center the component on the screen.
    NOTE on setBusy: I do recall issues with the setBusy option to block input. I recall it having a problem on some Unix systems, but I can't remember the details offhand (sorry).
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    * <CODE>AppFrame</CODE> is a <CODE>javax.swing.JFrame</CODE> subclass that
    * provides some convenient methods for applications.  This class implements
    * all the same constructors as <CODE>JFrame</CODE>, plus a few others. 
    * Methods exist to show the frame centered on the screen, display a splash
    * screen, run an initializer thread and set the frame as "busy" to block 
    * user input. 
    public class AppFrame extends JFrame implements KeyListener, MouseListener {
          * The splash screen window. 
         private JWindow splash = null;
          * The busy state of the frame. 
         private boolean busy = false;
          * The glass pane used when busy. 
         private Component glassPane = null;
          * The original glass pane, which is reset when not busy. 
         private Component defaultGlassPane = null;
          * Creates a new <CODE>AppFrame</CODE>. 
         public AppFrame() {
              super();
              init();
          * Creates a new <CODE>AppFrame</CODE> with the specified
          * <CODE>GraphicsConfiguration</CODE>. 
          * @param  gc  the GraphicsConfiguration of a screen device
         public AppFrame(GraphicsConfiguration gc) {
              super(gc);
              init();
          * Creates a new <CODE>AppFrame</CODE> with the specified title. 
          * @param  title  the title
         public AppFrame(String title) {
              super(title);
              init();
          * Creates a new <CODE>AppFrame</CODE> with the specified title and
          * <CODE>GraphicsConfiguration</CODE>. 
          * @param  title  the title
          * @param  gc     the GraphicsConfiguration of a screen device
         public AppFrame(String title, GraphicsConfiguration gc) {
              super(title, gc);
              init();
          * Creates a new <CODE>AppFrame</CODE> with the specified title and
          * icon image. 
          * @param  title  the title
          * @param  icon   the image icon
         public AppFrame(String title, Image icon) {
              super(title);
              setIconImage(icon);
              init();
          * Creates a new <CODE>AppFrame</CODE> with the specified title and
          * icon image. 
          * @param  title  the title
          * @param  icon  the image icon
         public AppFrame(String title, ImageIcon icon) {
              this(title, icon.getImage());
          * Initializes internal frame settings. 
         protected void init() {
              // set default close operation (which will likely be changed later)
              setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
              // set up the glass pane
              glassPane = new JPanel();
              ((JPanel)glassPane).setOpaque(false);
              glassPane.addKeyListener(this);
              glassPane.addMouseListener(this);
          * Displays a new <CODE>JWindow</CODE> as a splash screen using the
          * specified component as the content.  The default size of the
          * component will be used to size the splash screen.  See the
          * <CODE>showSplash(Component, int, int)</CODE> method description for
          * more details. 
          * @param  c  the splash screen contents
          * @return  the window object
          * @see  #showSplash(Component, int, int)
          * @see  #hideSplash()
         public JWindow showSplash(Component c) {
              return showSplash(c, -1, -1);
          * Displays a new <CODE>JWindow</CODE> as a splash screen using the
          * specified component as the content.  The component should have all
          * the content it needs to display, like borders, images, text, etc. 
          * The splash screen is centered on monitor.  If width and height are
          * <CODE><= 0</CODE>, the default size of the component will be used
          * to size the splash screen. 
          * <P>
          * The window object is returned to allow the application to manipulate
          * it, (such as move it or resize it, etc.).  However, <B>do not</B>
          * dispose the window directly.  Instead, use <CODE>hideSplash()</CODE>
          * to allow internal cleanup. 
          * <P>
          * If the component is <CODE>null</CODE>, a default component with the
          * frame title and icon will be created. 
          * <P>
          * The splash screen window will be passed the same
          * <CODE>GraphicsConfiguration</CODE> as this frame uses. 
          * @param  c  the splash screen contents
          * @param  w  the splash screen width
          * @param  h  the splash screen height
          * @return  the window object
          * @see  #showSplash(Component)
          * @see  #hideSplash()
         public JWindow showSplash(Component c, int w, int h) {
              // if a splash window was already created...
              if(splash != null) {
                   // if it's showing, leave it; else null it
                   if(splash.isShowing()) {
                        return splash;
                   } else {
                        splash = null;
              // if the component is null, then create a generic splash screen
              // based on the frame title and icon
              if(c == null) {
                   JPanel p = new JPanel();
                   p.setBorder(BorderFactory.createCompoundBorder(
                        BorderFactory.createRaisedBevelBorder(),
                        BorderFactory.createEmptyBorder(10, 10, 10, 10)
                   JLabel l = new JLabel("Loading application...");
                   if(getTitle() != null) {
                        l.setText("Loading " + getTitle() + "...");
                   if(getIconImage() != null) {
                        l.setIcon(new ImageIcon(getIconImage()));
                   p.add(l);
                   c = p;
              splash = new JWindow(this, getGraphicsConfiguration());
              splash.getContentPane().add(c);
              splash.pack();
              // set the splash screen size
              if(w > 0 && h > 0) {
                   splash.setSize(w, h);
              } else {
                   splash.setSize(c.getPreferredSize().width, c.getPreferredSize().height);
              centerComponent(splash);
              splash.show();
              return splash;
          * Disposes the splash window. 
          * @see  #showSplash(Component, int, int)
          * @see  #showSplash(Component)
         public void hideSplash() {
              if(splash != null) {
                   splash.dispose();
                   splash = null;
          * Runs an initializer <CODE>Runnable</CODE> object in a new thread. 
          * The initializer object should handle application initialization
          * steps.  A typical use would be:
          * <OL>
          *   <LI>Create the frame.
          *   <LI>Create the splash screen component.
          *   <LI>Call <CODE>showSplash()</CODE> to display splash screen.
          *   <LI>Run the initializer, in which: 
          *   <UL>
          *     <LI>Build the UI contents of the frame.
          *     <LI>Perform other initialization (load settings, data, etc.).
          *     <LI>Pack and show the frame.
          *     <LI>Call <CODE>hideSplash()</CODE>.
          *   </UL>
          * </OL>
          * <P>
          * <B>NOTE:</B>  Since this will be done in a new thread that is
          * external to the event thread, any updates to the splash screen that
          * might be done should be triggered through with
          * <CODE>SwingUtilities.invokeAndWait(Runnable)</CODE>. 
          * @param  r  the <CODE>Runnable</CODE> initializer
         public void runInitializer(Runnable r) {
              Thread t = new Thread(r);
              t.start();
          * Shows the frame centered on the screen. 
         public void showCentered() {
              centerComponent(this);
              this.show();
          * Checks the busy state.
          * @return  <CODE>true</CODE> if the frame is disabled;
          *          <CODE>false</CODE> if the frame is enabled
          * @see  #setBusy(boolean)
         public boolean isBusy() {
              return this.busy;
          * Sets the busy state.  When busy, the glasspane is shown which will
          * consume all mouse and keyboard events, and a wait cursor is
          * set for the frame. 
          * @param  busy  if <CODE>true</CODE>, disables frame;
          *               if <CODE>false</CODE>, enables frame
          * @see  #getBusy()
         public void setBusy(boolean busy) {
              // only set if changing
              if(this.busy != busy) {
                   this.busy = busy;
                   // If busy, keep current glass pane to put back when not
                   // busy.  This is done in case the application is using
                   // it's own glass pane for something special. 
                   if(busy) {
                        defaultGlassPane = getGlassPane();
                        setGlassPane(glassPane);
                   } else {
                        setGlassPane(defaultGlassPane);
                        defaultGlassPane = null;
                   glassPane.setVisible(busy);
                   glassPane.setCursor(busy ?
                        Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR) :
                        Cursor.getDefaultCursor()
                   setCursor(glassPane.getCursor());
          * Handle key typed events.  Consumes the event for the glasspane
          * when the frame is busy. 
          * @param  ke  the key event
         public void keyTyped(KeyEvent ke) {
              ke.consume();
          * Handle key released events.  Consumes the event for the glasspane
          * when the frame is busy. 
          * @param  ke  the key event
         public void keyReleased(KeyEvent ke) {
              ke.consume();
          * Handle key pressed events.  Consumes the event for the glasspane
          * when the frame is busy. 
          * @param  ke  the key event
         public void keyPressed(KeyEvent ke) {
              ke.consume();
          * Handle mouse clicked events.  Consumes the event for the glasspane
          * when the frame is busy. 
          * @param  me  the mouse event
         public void mouseClicked(MouseEvent me) {
              me.consume();
          * Handle mouse entered events.  Consumes the event for the glasspane
          * when the frame is busy. 
          * @param  me  the mouse event
         public void mouseEntered(MouseEvent me) {
              me.consume();
          * Handle mouse exited events.  Consumes the event for the glasspane
          * when the frame is busy. 
          * @param  me  the mouse event
         public void mouseExited(MouseEvent me) {
              me.consume();
          * Handle mouse pressed events.  Consumes the event for the glasspane
          * when the frame is busy. 
          * @param  me  the mouse event
         public void mousePressed(MouseEvent me) {
              me.consume();
          * Handle mouse released events.  Consumes the event for the glasspane
          * when the frame is busy. 
          * @param  me  the mouse event
         public void mouseReleased(MouseEvent me) {
              me.consume();
          * Centers the component <CODE>c</CODE> on the screen. 
          * @param  c  the component to center
          * @see  #centerComponent(Component, Component)
         public static void centerComponent(Component c) {
              centerComponent(c, null);
          * Centers the component <CODE>c</CODE> on component <CODE>p</CODE>. 
          * If <CODE>p</CODE> is null, the component <CODE>c</CODE> will be
          * centered on the screen. 
          * @param  c  the component to center
          * @param  p  the parent component to center on or null for screen
          * @see  #centerComponent(Component)
         public static void centerComponent(Component c, Component p) {
              if(c != null) {
                   Dimension d = (p != null ? p.getSize() :
                        Toolkit.getDefaultToolkit().getScreenSize()
                   c.setLocation(
                        Math.max(0, (d.getSize().width/2)  - (c.getSize().width/2)),
                        Math.max(0, (d.getSize().height/2) - (c.getSize().height/2))
          * Main method.  Used for testing.
          * @param  args  the arguments
         public static void main(String[] args) {
              final AppFrame f = new AppFrame("Test Application",
                   new ImageIcon("center.gif"));
              f.showSplash(null);
              f.runInitializer(new Runnable() {
                   public void run() {
                        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                        f.getContentPane().add(new JButton("this is a frame"));
                        f.pack();
                        f.setSize(300, 400);
                        try {
                             Thread.currentThread().sleep(3000);
                        } catch(Exception e) {}
                        f.showCentered();
                        f.setBusy(true);
                        try {
                             Thread.currentThread().sleep(100);
                        } catch(Exception e) {}
                        f.hideSplash();
                        try {
                             Thread.currentThread().sleep(3000);
                        } catch(Exception e) {}
                        f.setBusy(false);
    "Useful Code of the Day" is supplied by the person who posted this message. This code is not guaranteed by any warranty whatsoever. The code is free to use and modify as you see fit. The code was tested and worked for the author. If anyone else has some useful code, feel free to post it under this heading.

    Hi
    Thanks fo this piece of code. This one really help me
    Deepa

  • Creating a simple splash screen

    Hi,
    I'm trying to create a simple splash screen with maybe a button. When this is pressed, the next thing shown in the application window should be the cylinder with my picture of Arizona on it.
    Can anyone help?
    Also trying to place a new image onto the cylinder shape when the Open button is pressed in the FileChooser dialog box.
    Could someone help with this problem, I'm not sure what else is required.
    Thanks.
    import com.sun.j3d.utils.geometry.Cylinder;
    import com.sun.j3d.utils.image.*;
    import com.sun.j3d.utils.universe.*;
    import java.applet.Applet;
    import java.awt.BorderLayout;
    import java.awt.event.*;
    import com.sun.j3d.utils.applet.MainFrame;
    import java.io.*;
    import java.util.*;
    import javax.media.j3d.*;
    import javax.vecmath.*;
    import java.awt.Container;
    import javax.media.j3d.Group;
    import com.sun.j3d.utils.image.TextureLoader;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.JFrame;
    import javax.swing.JMenu;
    import javax.swing.JMenuBar.*;
    import javax.swing.JMenuItem;
    //import javax.swing.JSlider;
    import javax.swing.*;
    import javax.swing.filechooser.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.WindowAdapter;
    public class ProjectCylinder extends JApplet
    // Variable declarations
    JMenuBar menuBar;
    JMenu jMenu, jSubMenu;
    JCheckBoxMenuItem cbMenuItem;
    JRadioButtonMenuItem rbMenuItem;
    Container C=getContentPane();
    //JSlider sliderbar;
    // To setup the menu bar, options etc.
    public void init()
    new ProjectCylinder();
    //Create a file chooser
    final JFileChooser fc = new JFileChooser();
    menuBar = new JMenuBar();
    menuBar.setPreferredSize(new Dimension(400, 20));
    setJMenuBar(menuBar);
    JMenuItem jMenuItem;
    // Building the File menu
    jMenu = new JMenu("File");
    jMenu.setMnemonic(KeyEvent.VK_F);
    menuBar.add(jMenu);
    jMenuItem = new JMenuItem("Open...", new ImageIcon("A:/open.gif"));
    jMenuItem.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    int returnVal = fc.showOpenDialog(ProjectCylinder.this);
    if (returnVal == JFileChooser.APPROVE_OPTION)
    try
    File file = fc.getSelectedFile();
    // in here is supposed to be the functionality of putting a new image onto the cylinder
    catch(FileNotFoundException f)
    // do something here
    jMenuItem.setMnemonic(KeyEvent.VK_O);
    jMenuItem.setAccelerator(KeyStroke.getKeyStroke(
    KeyEvent.VK_T, ActionEvent.ALT_MASK));
    jMenu.add(jMenuItem);
    jMenu.addSeparator();
    // File Save
    jMenuItem = new JMenuItem("Save", new ImageIcon("A:/save.gif"));
    jMenuItem.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    int returnVal = fc.showSaveDialog(ProjectCylinder.this);
    if (returnVal == JFileChooser.APPROVE_OPTION)
    File file = fc.getSelectedFile();
    //this is where a real application would save the file.
    jMenuItem.setMnemonic(KeyEvent.VK_O);
    jMenuItem.setAccelerator(KeyStroke.getKeyStroke(
    KeyEvent.VK_T, ActionEvent.ALT_MASK));
    jMenu.add(jMenuItem);
    // File Close
    jMenuItem = new JMenuItem("Close");
    jMenuItem.setMnemonic(KeyEvent.VK_O);
    jMenuItem.setAccelerator(KeyStroke.getKeyStroke(
    KeyEvent.VK_T, ActionEvent.ALT_MASK));
    jMenu.add(jMenuItem);
    jMenuItem = new JMenuItem("Exit", KeyEvent.VK_T);
    jMenuItem.setMnemonic(KeyEvent.VK_T);
    jMenuItem.setAccelerator(KeyStroke.getKeyStroke(
    KeyEvent.VK_T, ActionEvent.ALT_MASK));
    jMenu.add(jMenuItem);
    C.add("South", menuBar);
    //sliderbar = new JSlider(JSlider.HORIZONTAL, 0, 30);
    //menuBar.add(sliderbar);
    //C.add("South", menuBar);
    // end init
    public BranchGroup createSceneGraph()
    BranchGroup objRoot = new BranchGroup();
    TransformGroup objScale = new TransformGroup();
    Transform3D t3d = new Transform3D();
    t3d.setScale(1.2); //Size of cylinder
    objScale.setTransform(t3d);
    objRoot.addChild(objScale);
    TransformGroup objTrans = new TransformGroup();
    objTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
    objTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
    objScale.addChild(objTrans);
    // Set up the colours
    Color3f black = new Color3f(0.0f, 0.0f, 0.0f);
    Color3f white = new Color3f(1.0f, 1.0f, 1.0f);
    Color3f red = new Color3f(0.7f, .15f, .15f);
    // Set up the texture map
    TextureLoader loader = new TextureLoader("A:\\Arizona.jpg","LUMINANCE", new Container());
    Texture texture = loader.getTexture();
    texture.setBoundaryModeS(Texture.WRAP);
    texture.setBoundaryModeT(Texture.WRAP);
    texture.setBoundaryColor( new Color4f( 0.0f, 1.0f, 0.0f, 0.0f ));
    // Set up the texture attributes
    TextureAttributes texAttr = new TextureAttributes();
    texAttr.setTextureMode(TextureAttributes.MODULATE);
    Appearance ap = new Appearance();
    Material mat = new Material();
    ap.setTexture(texture);
    ap.setTextureAttributes(texAttr);
    //set up the material
    ap.setMaterial(new Material(white, red, white, red, 1.0f));
    // Create a cylinder
    int primflags = Cylinder.GENERATE_NORMALS +Cylinder.GENERATE_TEXTURE_COORDS;
    Cylinder CylinderObj = new Cylinder(0.5f, 0.5f, primflags, ap);
    objTrans.addChild(CylinderObj);
    //Add to scene graph
    BoundingSphere bounds =new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
    //Shine coloured lights
    Color3f lColor1 = new Color3f(0.7f, 0.0f, 0.7f);
    Color3f lColor2 = new Color3f(0.7f, 0.7f, 0.0f);
    Vector3f lDir1 = new Vector3f(-1.0f, -1.0f, -1.0f);
    Vector3f lDir2 = new Vector3f(0.0f, 0.0f, -1.0f);
    DirectionalLight lgt1 = new DirectionalLight(lColor1, lDir1);
    DirectionalLight lgt2 = new DirectionalLight(lColor2, lDir2);
    lgt1.setInfluencingBounds(bounds);
    lgt2.setInfluencingBounds(bounds);
    objScale.addChild(lgt1);
    objScale.addChild(lgt2);
    // Let Java 3D perform optimizations on this scene graph.
    objRoot.compile();
    return objRoot;
    } // end BranchGroup createSceneGraph
    public ProjectCylinder()
    C.setLayout(new BorderLayout());
    Canvas3D c = new Canvas3D(null);
    C.add("Center", c);
    // Create a simple scene and attach it to the virtual universe
    BranchGroup scene = createSceneGraph();
    SimpleUniverse u = new SimpleUniverse(c);
    u.getViewingPlatform().setNominalViewingTransform();
    u.addBranchGraph(scene);
    } // end ProjectCylinder
    public static void main(String argv[])
    BranchGroup group;
    new MainFrame(new ProjectCylinder(), 300, 300);
    } // end void main
    } // end class ProjectCylinder

    Yeah I thought JWindow should be used, but it's getting it into my project that is the real problem.

  • How to make a splash screen

    Hello everyone,
    I am trying to make a kind of splash screen.
    I use JWindow for this and it works well.
    My problem is, that I need to make the background of the screen "non-opaque". So only the image I add will be shown, without the background rectangle.
    I search for something like setOpaque(false) method in class JButton.
    But there is no such method for this class.
    I would be very happy if you could help me.

    I tried this,
    but it does not help. The background is being shown.
    import javax.swing.*;
    import java.awt.*;
    public class SSB extends JWindow
         public static void main(String[] args)
              new SSB();
         public SSB()
              super();
              this.setBounds(20,20,300,300);
              MyContainer c = new MyContainer();
              c.setOpaque(false);
              this.setContentPane(c);
              this.show();
         class MyContainer extends JComponent
              MyContainer()
                   super();
    [\code]

  • Web start won't display splash screen

    Hi, I am using the following .jnlp file.. The problem I am having is that web start will not display the splash screen specified below. It displays the icon fine, but not the splash screen. I cannot find an answer, can anyone help?
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+"
    codebase="https://mywebserver/program"
    href="https://mywebserver/progem/start.jnlp">
    <information>
    <title>My Title</title>
    <vendor>My company</vendor>
    <description></description>
    <offline-disallowed/>
    <icon href="ban1.jpg" kind="splash" />
    <icon href="icon.jpg"/>
    </information>
    <resources>
    <j2se version="1.1+"/>
    <jar href="start.jar"/>
    </resources>
    <applet-desc
    main-class="myclass"
    documentbase="start..html"
    name="Program Name"
    width="180"
    height="100">
    </applet-desc>
    </jnlp>

    I can see no reason why this wouldn't work. Can you try looking at the splash.xml file in the "splash" directory in the cache ?
    the file should contain an entry for your program, pointing to your splash file.
    /Andy

  • Main program start before splash screen, help

    hi:
    below is the splash screen code:
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.io.PrintStream;
    import java.util.Random;
    class Splash extends JWindow {
         public Splash(String filename, Frame f, int waitTime) {
              super(f);
              JLabel l = new JLabel(new ImageIcon(filename));
              getContentPane().add(l, BorderLayout.CENTER);
              pack();
              Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
              Dimension labelSize = l.getPreferredSize();
              setLocation(screenSize.width / 2 - (labelSize.width / 2), screenSize.height / 2 - (labelSize.height / 2));
              addMouseListener(new MouseAdapter() {
                   public void mousePressed(MouseEvent e) {
                        setVisible(false);
                        dispose();
              final int pause = waitTime;
              final Runnable closerRunner = new Runnable() {
                   public void run() {
                        setVisible(false);
                        dispose();
              Runnable waitRunner = new Runnable() {
                   public void run() {
                        try {
                             Thread.sleep(pause);
                             SwingUtilities.invokeAndWait(closerRunner);
                        } catch (Exception e) {
                             e.printStackTrace();
                             // can catch InvocationTargetException
                             // can catch InterruptedException
              setVisible(true);
              Thread splashThread = new Thread(waitRunner, "SplashThread");
              splashThread.start();
    below is the constructor that started the splash and the main:
    public static void main(String args[])
    PictureViewer PV = new PictureViewer();
    standaloneApp = true;
    splash Splash sw = new Splash("prestigestetho.gif",null, 5000);
    the splash appear just fine, the problem is that it appears after
    my main program appear first.
    I try to shift the priority of splash, which is sw first and then PV,
    in that case the splash screen appear first then PV, but this time PV
    stay in front of sw makes it totally not viewable.
    is there any method to make splash screen appear first and on the screen you can see the process of main program starting up (for example
    : loading this ...., loading that.....) something like acrobat reader's
    startup screen, and then splash screen disappear and then main program
    pop up.

    okay, I got it, it's under SwingSet2.java the related code is as follow:
    // Used only if swingset is an application
    private JFrame frame = null;
    private JWindow splashScreen = null;
    // The tab pane that holds the demo
    private JTabbedPane tabbedPane = null;
    private JEditorPane demoSrcPane = null;
    private JLabel splashLabel = null;
    * SwingSet2 Constructor
    public SwingSet2(SwingSet2Applet applet, GraphicsConfiguration gc) {
    // Note that the applet may null if this is started as an application
         this.applet = applet;
    // Create Frame here for app-mode so the splash screen can get the
    // GraphicsConfiguration from it in createSplashScreen()
    if (!isApplet()) {
    frame = createFrame(gc);
    // setLayout(new BorderLayout());
         setLayout(new BorderLayout());
    // set the preferred size of the demo
         setPreferredSize(new Dimension(PREFERRED_WIDTH,PREFERRED_HEIGHT));
    // Create and throw the splash screen up. Since this will
    // physically throw bits on the screen, we need to do this
    // on the GUI thread using invokeLater.
    createSplashScreen();
    // do the following on the gui thread
         SwingUtilities.invokeLater(new Runnable() {
         public void run() {
              showSplashScreen();
    initializeDemo();
         preloadFirstDemo();
         // Show the demo and take down the splash screen. Note that
         // we again must do this on the GUI thread using invokeLater.
         SwingUtilities.invokeLater(new Runnable() {
         public void run() {
              showSwingSet2();
              hideSplash();
         // Start loading the rest of the demo in the background
         DemoLoadThread demoLoader = new DemoLoadThread(this);
         demoLoader.start();
    * Show the spash screen while the rest of the demo loads
    public void createSplashScreen() {
         splashLabel = new JLabel(createImageIcon("Splash.jpg", "Splash.accessible_description"));
         if(!isApplet()) {
         splashScreen = new JWindow(getFrame());
         splashScreen.getContentPane().add(splashLabel);
         splashScreen.pack();
         Rectangle screenRect = getFrame().getGraphicsConfiguration().getBounds();
         splashScreen.setLocation(
    screenRect.x + screenRect.width/2 - splashScreen.getSize().width/2,
              screenRect.y + screenRect.height/2 - splashScreen.getSize().height/2);
    public void showSplashScreen() {
         if(!isApplet()) {
         splashScreen.show();
         } else {
         add(splashLabel, BorderLayout.CENTER);
         validate();
         repaint();
    * pop down the spash screen
    public void hideSplash() {
         if(!isApplet()) {
         splashScreen.setVisible(false);
         splashScreen = null;
         splashLabel = null;

  • Image on the form for splash screen

    Hi there,
    How can I replace an existing image with a new one on my splash screen. Here's what I mean by this:
    I have a form which already has a splash screen logo. This logo will be replaced with a new one. The existing logo is attached as an image in the form of a .tiff file. There are no triggers on the form excepting a "when new form instance" which just says "SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW,TITLE,'ABC').
    How can I ensure that the old logo is replaced with a new one.
    Here's what I did to replace, i.e my trouble shooting steps:
    a)opened the form and deleted the existing splash screen/.tif file
    b)went into the layout editor and clicked on "EDIT-> IMPORT" and mapped it to the .tif file that's persent in the local directory. As soon as I click OK, I get the following message :
    FORMS-VGS-507- Cannot open file or file not in specified format.
    Could any one help me out with this problem or can any one give me a better solution.
    Thanks in advance

    Are you talking about changing the splash screen when the Oracle Jinitiator loads? If so, this is controlled by the "base.htm" file in the /%FORMS_HOME%/forms/server directory (Windows and UNIX). If so, check out the [Oracle® Application Server Forms Services Deployment Guide|http://download.oracle.com/docs/cd/B25016_04/doc/dl/web/B14032_03/toc.htm], section [4.3.4.4 Applet or Object Parameters | http://download.oracle.com/docs/cd/B25016_04/doc/dl/web/B14032_03/configure003.htm#i1077074]. These links are for Forms 11g and 10g. If you are using an older, go to the [Oracle Forms Developer and Forms Services Documenation | http://www.oracle.com/technology/documentation/forms.html] to choose the right version and then select the Forms Services Deployment Guide. The "*splashScreen*" parameter in the base.htm file controls which image file is displayed as the splashscreen.
    If this is not the splash screen image you are talking about, please provide more information about your situation so we can better help you.
    Hope this helps.
    Craig...
    If a response is helpful or correct, please mark it accordingly

  • Splash screen won't come up

    I have installed JWS and just did what was written in the document...but when I clicked on the link on my web page, it would print the information desciption on my .jnlp file. Not even the splash screen will come up, it was like JWS wasn't even there. I am running out of idea, please help.

    Hi guys, thanks for your help. I have finally get my application going with JWS. The problem was I forgot to set the MIME Type in the xml file.
    Now I have another problem, after I got my application running, I would like to try to get an applet to run. The problem is I always get 2 errors after the splash screen comes up.
    1. Unable to load resource: http://corp08/WebStart/WebStart.jar.
    I thought there was something wrong with the way I jar the files so I jar it again and get the second error.
    2. Could not find main-class com.norwestlabs.WebStart.applet.WebStartApplet in http://corp08/WebStart/WebStart.jar
    So of course I jar the files again, then the whole thing goes back to error 1, and then 2, than 1 again...
    I have check my jar file, my main file is in the root directory and I have only 1 jar file. I have also check the path in my .jnlp file, they seem to be correct.
    Here is my jnlp file:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- JNLP File for Java Web Start Demo Demo Application -->
    <jnlp
    spec="1.0+"
    codebase="http://corp08/WebStart"
    href="WebStart.jnlp">
    <information>
    <title>Java Web Start Demo Application</title>
    <vendor>#Sun Microsystems, Inc.</vendor>
    <homepage href="temp2.html"/>
    <description>Java Web Start Demo Application.</description>
    <description kind="short">A demo of the capabilities of the Java Web Start Demo.</description>
    <offline-allowed/>
    </information>
    <resources>
    <j2se version="1.3"/>
    <jar href="WebStart.jar"/>
    </resources>
    <applet-desc
    documentBase="http://corp08/WebStart"
    name="WebStartApplet"
    main-class="com.norwestlabs.WebStart.applet.WebStartApplet"
    width="527"
    height="428">
    <param name="archive" value="WebStart.jar"/>
    </applet-desc>
    </jnlp>
    Please help.
    Thanks,
    Noel

  • Disable/sk​ip hibernatio​n splash screen?

    Is there any way to disable the Hibernation splash screen, or make it so that it does not occupy the whole screen? I am using Spyware Terminator, and it asks for a "allow/disallow" decision when new software runs - I updated the Power Management software, and now when I go to hibernate, the splash screen obscures the allow/disallow dialog and the computer hangs, because it recognizes the new power management program as new. No problem if I disable Real-Time Protection. Any advice? As far as I can tell, I cannot manually specify the program to be ignored, and might be simpler to disable/skip the hibernation splash screen.
    thank you.

    This behavior was introduced by a security "fix" intended to prevent a DNS re-binding attack which permits unsigned applets to escape the applet sandbox.  The "fix" was, imo, very poorly thought out.  You think you have a problem with 1.5 megabits of applet jars, but I have 8 megabytes, hundreds of thousands of users, with lousy networks. So now I'm stuck with a colocation vendor.  Imagine my chagrin when they changed *their* ISP and thus their IP addresses.  
    As far as I can see, signed applets are already permitted (if the user allows) to communicate outside the sandbox, so this "fix" should not have been applied to signed jars, only to unsigned ones.  There are a couple of other techniques that Oracle might have used to prevent this attack, but they chose the simplest one, effectively preventing anyone from using the most common, inexpensive strategies for improving the availability of their web-based Java applications.

  • Urgent!! Splash screen problems when using 9iAS for forms

    I'm having some difficulty getting rid of the "Oracle Developer" splash screen that comes up when running a form from 9iAS using jinitiator v1.1.8.10.
    There is a
    <!-- PARAM NAME="splashScreen" VALUE="yourlogo.gif" -->
    <!-- set splashScreen to "no" will suppress the splash screen which is the Oracle Developer Server screen -->
    <PARAM NAME="splashScreen" VALUE="NO">
    but there is also
    <EMBED type="application/x-jinit-applet;version=1.1.8.10"
    java_CODE="oracle.forms.engine.Main"
    java_CODEBASE="/web_code/"
    java_ARCHIVE="/web_code/f60all.jar"
    WIDTH=800
    HEIGHT=560
    serverPort="9000"
    serverArgs="module=module_path&name.fmx"
    serverApp="default"
    lookAndFeel="default"
    separateFrame="false"
    pluginspage="http://something:8080/web_html/jinit_download810.htm">
    No matter what I do, the splash screen still shows up. Please help me get rid of this.
    Thank you.

    Possibly a bad choice of configuration. Of these classes:
    ******.bean.RssFeedBean.populateRssItems(RssFeedBean.java:59)
    ******.bean.RssFeedBean.<init>(RssFeedBean.java:34)
    ******.util.TagReplacer.replace(TagReplacer.java:145)
    ******.domain.Revision.replace(Revision.java:102)
    ******.handlers.PageEvent.respond(PageEvent.java:89)
    ******.servlets.Controller.doGet(Controller.java:100)Are all of them in your web application, in either WEB-INF/lib or WEB-INF/classes? And is JDOM there too?

  • Z77A-GD65 Multiple BIOS Issues - B4 Hang, Splash Screen Blinking

    Back in November 2012, I built a home server with a Z77A-GD65.  Lately, I've noticed some strange things happening that I've been trying to research but to no avail.
    First off, I get the B4 code hang-up whenever I'm booting.  This doesn't matter if it's a cold boot or a reboot, it hangs on B4 for about 10-15 seconds, flashes 92 really quick, and then goes to A2 which it stays for another 5 or so seconds.  After that I get the MSI splash screen for about 1 second, then it blinks 5 times.  After that it goes into Windows just fine.
    The blinking is a new issue, the B4 hang is not.  I've read from multiple posts that this is a USB issue.  When I disable USB legacy support, the issue goes away, but of course then I can't have legacy support.  I have yet to figure out what exact device is causing it.  In the process of trying to figure this out, I updated BIOS to A.A0.  After updating to this version of BIOS the splash screen blinks 5 times before going to the "Starting Windows" splash screen.  This is a more difficult issue to figure out why it's doing this because if you search for "BIOS" and "flash" or "flashes" or "flashing", you typically get results for flashing your BIOS.   Hence, why I'm using the term "blinking".  But even then I can't really find a solution out there.
    I also happened to see that the website for the Z77A-GD65 is showing a newer BIOS version, but I'm unable to flash this (at least using M-Flash).  I threw it on a USB, re-enabled USB legacy and whenever I click on it to install, the BIOS screen hard locks.  The screen just freezes exactly where it's at in the BIOS and the mouse is dead.  However, I can CTRL+ALT+DEL on the keyboard and it will reboot the system so I don't need to power cycle the computer.  Not sure why this is happening either.  Perhaps I need to flash this a different way?  Maybe I don't need to flash this at all?
    I could really use some input here on why this is happening.
    As for the specs on my system, they're as follows:
    i7-3770K overclocked to 4.2 Ghz by using the Turbo Mode in BIOS
    32GB Komputerbay DDR3 PC3-12800 1600MHz DIMM with Low Profile Blue Heatspreaders Quad Channel RAM | 9-9-9-24 XMP ready
    AMD PowerColor 7870 Myst Edition GPU - currently not overclocked although overclocking this doesn't seem to affect any issues
    2 - 128 GB Corsair SATA III SSD - one runs the OS, the other I use to load games from
    2 - 500 GB Seagate Barracuda 7200 RPM Sata II HDD's mirrored via Windows 7
    1 - 750 GB Seagate Barracude 7200 RPM Sata II HDD
    1 - 1 TB Western Digital MyBook USB 2.0 external
    2 - 3 TB Seagate USB 3.0 external
    ASUS DVD Burner - not sure which one, it's a cheapy $20 from Newegg
    1 - PCI USB 3.0 expansion card
    Antec TruePower New TP-550 Modular 550W Continuous Power ATX12V V2.3 / EPS12V V2.91 SLI Certified CrossFire Ready 80 PLUS BRONZE Certified Active PFC "compatible with Core i7/Core i5" Power Supply
    NZXT Switch 810 gunmetal - currently have 4 fans running but plan on more, also the Switch 810 has the multi-card reader in the front with 1x SD Card, 2x USB 2.0, 2x USB 3.0
    for peripherals
    1 - Microsoft 360 Wireless controller adapter (legit one, not the knockoff although I had a knockoff prior to getting the real deal)
    1 - Logitech Wireless USB Keyboard with Touchpad
    I tried to be thorough.  Thanks in advance for any help!

    Quote from: PirateDog on 26-August-13, 12:45:18
    Probably a USB device problem.
    This is a candidate, as well as mouse and keyboard. Disconnect USB devices one at a time to find the culprit.
    A lot of devices running. PSU a +12V single rail or is it multi rail? A rail going to the graphics or components may not be enough amps. My best guess is the card reader.
    For UEFI/BIOS flashing, select your mainboard here and use the forum flash method;
    I'll definitely try unplugging some of these USB devices to see if that helps with the B4 hang issue.
    As for the PSU, according to the description for it on Newegg:  "Four industry-leading independent +12v rails are provided for more stable and safer power output."  It has two rails going to the GPU.  The GPU is a new addition to the system and so I wasn't running it until recently.  The issues were occurring beforehand, but you're right that this PSU is underpowered for the rig considering PowerColor recommends a minimum of 500w.  I'm going to be buying a larger capacity one sometime in the very near future.  Any recommendations on good modular PSU's?  What's a good way to tell what wattage to get?
    Thanks for letting me know about the forum flash method.  I'll be back later when I have some results.

  • Want to hide or mod FCP 6 Splash Screen

    Just want to hide the splash screen on my FCP system. I rent it to indy projects and I want to protect my serial. How can I access the Splash Screen Image? I've been able to mod the splash screen on all the other apps on the rental system but can not find or get to the Splash Screen for Color and FCP 6. I know that a real hacker can find my serial some how but I am not trying to block those geniuses. Just the lazy ones that are willing to go as far as copying or screen grabbing my Splash Screen and or About Screens to get a working serial. I know how to mod the Splash Screen to hide my serial and how to hide the app so the user can't get to the splash screen. I just don't know where the splash screen file is. I've read that it is in the .nib files? I just wanna hide my serial. Don't care if I mod it myself or install an app that does it for me. Any apple people or anyone else know what I can do to protect my product. I've also been told that the splash screen does not display the full serial but it soo totally does. Hey apple, please add the ability to hide this splash screen. Perhaps with it's own password to unlock and show again? OR, make splash screen hiding a universal ability in the OS. That would be sweet! Anyway,... ideas?

    Hey all. I have been able to mod the splash screen on all the apps in FCP Studio 2 except for FCP and Color. The other studio apps Splash Screens access a .psd file. The only files I've found in Color that seem like they might be the splash screen files are ft_splash.Isi, ft_splashEDU.Isi, ft_splashNFR.Isi and ft_splashVOL.Isi
    How do I open a .Isi file? If I can figure that out I can hide the serial number for Color but it still leaves FCP. Why do apps show the serial on the splash screen at all? What purpose does this serve?

Maybe you are looking for

  • WIS 10901 error while running WEBI report

    Hello All When we try to run WEBI report on BW query for Cost center accounting infocube its giving following error when we add measure in the info view. "A database error occured. The database text is: Error in MDDataSetBW.GetCellData. See RFC trace

  • A library program for negative exponents.

    Ok im looking to create a program that can take a number and take that number to a negative exponent. such as this 2^(-2) = .25 this is what i would like to accomplish. heres what i have. public static double power(double base, double expo) //return

  • Not printing in colour

    I have a file that i made in illustrator sc5, but when i press print,, it doesnt print in colour, even though my printer settings say that it should be. HELP

  • Setting up email addresses in a text field.

    Hi. Can anyone help me. I am using Adobe Designer 7.0 and would like to know if there is a way of linking a email address in a text field box to a submit email button. As far as I can tell you can only put one email address in the object field and th

  • HT201209 Why can't i use my money in my itunes account?

    I entered my new iTunes gift card into the iTunes store and once i go to use it, it asks for my credit card billing information. Do i need to fill that out to be able to use the card?