🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #8357

Re: Hiding Title Bar

#8357
From: Joi Ellis
Date: Tue, 26 Sep 2000 00:00
53 lines
2346 bytes
Captain Claw wrote:
> 
> How can I hide the Title bar of a Frame. I need it for a splash screen
> in my application.
> Also is there any way to centre my splash screen. A sample screen would
> be of great help.

Use a JWindow, not a JFrame.

package com.aravox.ShunWizard;
 
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.net.URL;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JWindow;
 
public class Splash extends JWindow {
    static java.util.ResourceBundle resBunble =
java.util.ResourceBundle.getBundle("com.aravox.ShunWizard.resBundle")/*#BundleType=Property*/;
 
  public Splash() {
    super();
    JLabel image;
 
    try {
      image =
        new JLabel( new ImageIcon( getClass().getResource( "aravox2.gif" ) ) );
    } catch (Exception e) {
      image = new JLabel(resBunble.getString("Splash_Text"/*#Finished:Original="<html>Aravox Technologies,
Inc.<br>Loading...<@/html>"*/));
    }
    getContentPane().add(image);
    Dimension screensize = Toolkit.getDefaultToolkit().getScreenSize();
    setLocation( screensize.width / 3, screensize.height / 3 );
    pack();
    validate();
    setVisible(true);
  }
}                                                                                                                              


--
Joi Ellis                    Software Engineer
Aravox Technologies          joi@aravox.com, gyles19@visi.com

No matter what we think of Linux versus FreeBSD, etc., the one thing I
really like about Linux is that it has Microsoft worried.  Anything
that kicks a monopoly in the pants has got to be good for something.
           - Chris Johnson
Technical Details
Message-ID: <39D0C679.DA56F888@aravox.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <39CCE866.4063466B@yahoo.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,ca51ca1cb7c9b686
X-Google-Attributes: gid111d45,public
From: Joi Ellis <joi@aravox.com>
Subject: Re: Hiding Title Bar
Date: 2000/09/26
Message-ID: <39D0C679.DA56F888@aravox.com>
X-Deja-AN: 674339552
Content-Transfer-Encoding: 7bit
References: <39CCE866.4063466B@yahoo.com>
To: Captain Claw <captainclawfree@yahoo.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Aravox Technologies
Mime-Version: 1.0
Reply-To: joi@aravox.com
Newsgroups: borland.public.jbuilder.java.swing