This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
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.