"Il y a peu de choses qui me soient impossibles..."
Rob Camick wrote: setAlignmentX(CENTER_ALIGNMENT);
"Il y a peu de choses qui me soient impossibles..."
"Il y a peu de choses qui me soient impossibles..."
the actual value of CENTER_ALIGNMENT is 0.5f, which is the initial value when the JPanel is created.
Setting the JPanel's Layout Manager to a new BoxLayout(this, BoxLayout.PAGE_AXIS) changes the alignmentX value to 0.0f (which is RIGHT_ALIGNMENT
which is RIGHT_ALIGNMENT
Adding the explicit call to setAlignmentX in the DText constructor solves the problem even if you do it at the beginning
Adding the explicit call to setAlignmentX in the DText constructor solves the problem even if you do it at the beginning,
Rob Camick wrote:...getting in too deep. This is a mystery I won't be able to solve. Good luck if anybody else decides to follow up.
"Il y a peu de choses qui me soient impossibles..."
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |