File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT / JFace and the fly likes Custom Swing Text Component? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "Custom Swing Text Component?" Watch "Custom Swing Text Component?" New topic
Author

Custom Swing Text Component?

Tom West
Greenhorn

Joined: Dec 10, 2001
Posts: 2
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
 
 
subject: Custom Swing Text Component?
 
Threads others viewed
Need to draw spiral within dynamically changing rectangle....
custom paint component
transparent fillRect possible?
Swing Gurus!!! Plz help me
Tree and drawing within the same panel
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture