Hi,
Maybe someone can help me with this problem. I need a text component in Java that resizes itself dynamically. For example, it starts off at initial size (1 char wide and high), surrounded by a black rectangle. As I type, this rectangle will grow horizontally, and can grow vertically up until 5 lines.
Also, this component will be wrapped inside of another class that handles clicking on the object and moving it around a drawing area (a JComponent), in this case. So it's positioning is dynamic as well, based on where the user drags and drops the component.
This is probably confusing and vague, but if you have any insight into a good way to do this, or something in Java to help, please email me.
At this point I've tried extending JTextComponent, but get a null pointer exception that I've had little to no luck tracing.
Cheers!
Tom
Maybe someone can help me with this problem. I need a text component in Java that resizes itself dynamically. For example, it starts off at initial size (1 char wide and high), surrounded by a black rectangle. As I type, this rectangle will grow horizontally, and can grow vertically up until 5 lines.
Also, this component will be wrapped inside of another class that handles clicking on the object and moving it around a drawing area (a JComponent), in this case. So it's positioning is dynamic as well, based on where the user drags and drops the component.
This is probably confusing and vague, but if you have any insight into a good way to do this, or something in Java to help, please email me.
At this point I've tried extending JTextComponent, but get a null pointer exception that I've had little to no luck tracing.
Cheers!
Tom