Forums Register Login

Java Components doing whatever they want

+Pie Number of slices to send: Send
Hello,

I have really stuck at this point. I have the code below:

The output is as shown below :

HERE

You can imagine from my code that is not the result I want! So, what I'm doing wrong? Any idea?

Thank you
+Pie Number of slices to send: Send
If there are separate code blocks for all values of "i" anyway, then there's no point in having the loop at all.

I can't tell what you're trying to accomplish, though; can you describe it in words?
+Pie Number of slices to send: Send
The Components are not doing “what they want”, but what they always do: what you tell them. You said to add the panel four times, and it added the panel four times.
+Pie Number of slices to send: Send
Yes but, I'm creating new Panel each time and also has different position for each condition(North, South, Page Start, Page End). Also, I have right and left be Page Start and Page End, then why place them North and South ? :S Really weird
2
+Pie Number of slices to send: Send
 

Pan Niko wrote:You can imagine from my code that is not the result I want!



Well, no we can't really. If that's the code that's giving you the output, then how can we expect it to do anything else than what it's doing?

Why don't you tell us what you want?
+Pie Number of slices to send: Send
Hello,

Thanks for responses. With code above wanted to add different arrows around a board. That's why I was using North, South, Page End and Start. Figured out how to do it and are simply two things. First, use West and East instead of Page End - Start and second panel's layout to be BoxLayout(), with Y_Axis or X_Axis.

Thank you, again
Don't play dumb with me! But you can try this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1032 times.
Similar Threads
KeyListener not working for JLabel.
Converting an Application into JApplet
JButtons fail to change
Swap
Help with two buttons on applet
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:10:17.