I do NOT understand why you refuse to do what I have been recommending for many posts.
Please explain why you will not do the following:
Have you printed out the values I have been talking about so...
Type: Posts; User: Norm
I do NOT understand why you refuse to do what I have been recommending for many posts.
Please explain why you will not do the following:
Have you printed out the values I have been talking about so...
I am trying to have you debug your program so you can see what the problem is.
Have you printed out the values I have been talking about so you can see the problem?
Print out the values that are...
You are assuming you know something. To be sure, you need to Print out the values before they are used.
Re-read post #34
Did you print out the sizes of the labels: logo and picture as I suggested in post#26?
You use the labels' values in the setBounds() call. What are they?
logo.setBounds(600, 100, logo.getWidth(),...
Did you print out the sizes of the labels as I suggested in post#26?
You use the labels values in the setBounds() call. What are they?
You will have to explain.
You print out the values of things to see if they are what you expect them to be. If the values are different, then your assumptions about how the program is working are probably wrong.
Why wouldn't a label show when you remove the layout manager and use setBounds() to position and size it. Are you sure the size is correct? Print out its width and height to make sure.
What happens when you remove setting the layout manager?
Look at the LayerPaneDemo.java program.
What examples with a layered pane used a layout manager? I only looked at that one.
Yes, the layout manager will position components. Does the tutorial use a layout manager for the layered pane?
Shouldn't the setBounds() with the same x,y locations put the components on top of each other?
But they are not on top of each other. What other code is putting them where they are going?
What code...
The clue is: what would cause the two components to be besides each other instead of at the location where you set their bounds? That cause can be seen in a difference between your code and the code...
Do you want the two images besides each other? The code you are using does that.
Did you compare your code to how the tutorial's sample code: LayeredPaneDemo does it?
Where do those statements place the components? How are their locations "besides each other"?
Think about that. What code would put the pictures besides each other?
Compare your code to the tutorial's code. You are doing some things differently.
One problem I see it the value for x of 600? where is that?
It be better if you made the test code so it is doing what you want and shows the problem.
Have you looked at and experimented with the sample code in the tutorial?
Go to the API doc for the...
You have too many image file references in the code. Can you minimize the number of images to one or two for testing?
Can you make a small, complete program that compiles, executes and shows the problem?