Hey everyone! I'm just starting with Swing and actually am moving along pretty well.. I've gone forward and created a page using GridBagLayout. I've also created my own text field class, that extends JTextField. The field comes up fine, and works like it's supposed to, however, I can't place it correctly in my GridBagLayout... I cannot seem to right-justify the text box. If I add it in with no fill, it will be flushed to the left hand side of the allocated space. If I add horizontal fill, the text box fills the entire allocated space. I cannot get the text box to have right-alignment that is flushed against the right hand side of the allocated space. This code is in the constructor of my created class....
Any suggestions would be greatly appreciated!! Thanks in advance...
Doug
Code:
setHorizontalAlignment(JTextField.RIGHT);
setAlignmentY(JTextField.RIGHT_ALIGNMENT);
setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
Any suggestions would be greatly appreciated!! Thanks in advance...
Doug