JavaBean property TextPosition
I have a bean with a couple components, one of which is a JLabel. I'm trying to create a property which allows the user to edit the horizontal and vertical text position. I can enter integers in the property, but I would like to present the user with Top, Bottom, Center, Leading... I can probably figure this out if someone points me in the right direction.
Re: JavaBean property TextPosition
Anyone? Should I post this question somewhere else?
Re: JavaBean property TextPosition
Can you clarify your question a bit, perhaps post a short example code? Do you just wish to modify the position of the text within a JLabel?
Re: JavaBean property TextPosition
Yes, I want to modify the position of the text within a JLabel. So for the set and get functions of my bean I want have the option to select leading, center, or trailing in the horizontal text postion proptery. Right now I can only pass ints.
Code :
public void setTextHorizontalAlignment(int align)
{
textHorizontalAlignment = align;
}
public int getTextHorizontalAlignment()
{
return textHorizontalAlignment;
}
Re: JavaBean property TextPosition