I'm now having a problem with a simple splash screen that I have to make. I have the Java icon as a .gif image in my local directory and I am calling it into a JWindow that is set up as the splash screen using Graphics mode (a requirement). The problem is that either the Java icon shows up or the Graphic text does, but not both. Why? I would appreciate some help on understanding this. Thank you.
The default layout manager for JWindow is BorderLayout. When you add a component to a BorderLayout with no constraint, eg, "East" or BorderLayout.NORTH, it is added to the center section by default. When you add the splash screen to the center and then add the JLabel to the center the spalsh screen is removed and the JLabel is placed in the center. You could add the JLabel to the north or south sections. See the BorderLayout api for details.
[ May 18, 2005: Message edited by: Craig Wood ]
Joined: May 16, 2005
Thank you for the reminder and code example. I made one north and the other center and things are fine now. I knew it would be something simple...sheesh I don't know if I'll ever learn this stuff.