I have this task. I need to create rectangles and lines aand to put text inside the rectangle(comment box). I managed to cread rectangles and lines i can put text inside but the text is not displaying when i chancge the button(e.g i want to draw another rectangle
after i created a comment box). I worked with JTextArea and seem to be stacked.
First i dont know where is the problem. because i dont know how to do it.
Maybe you didnt understand my problem. I dont know how to do that and dont know where is the problem.
I tried to do it like this
when i put the mouse down , at mouseDown i did something like this:
I create my own class rectanglet everything is working but text, because when i click on the trectangle the text area doesnt display all , just a small part and after i enter some text it appears aand the rest but when i tried to change the button because i have buttons for every draw(rectangle , line, clear_all and text) the text dissapears. First i want to know how to save the text and draw it every time i change the shape.
More if i try to delete all the shapes including the JTextArea the textarea reamins there.
Declration variables and stuff
And the paint function
in the next mouse event
mouseUp i tried to save it in a vector
The problem is that i dont know how to do to remain on the screen, i think is maybe in the paint function.
Like I said in the other thread: You've been told what you need to do to get help. That's going to be the case no matter where you go, unless you're paying for a professional tutor. Whether or not you're willing to put forth that effort is up to you.
"No matter where you go" means that even on other forums, you're going to have to post an SSCCE and ask a specific question. Read the SSCCE link. It tells you what to do. Or don't, and don't get help. It's really up to you.
Although he puts it a bit harshly, Kevin is quite right. If you don't provide us information (and especially with GUI programs, an SSCCE is often required information) we cannot help you. To solve strange behaviour we must often see strange behaviour ourselves.
And the only reason I stated anything the least bit harshly was because I tried so many times in the other thread to coax an SSCCE or a specific question out, only to have the OP call it quits and jump to another forum even after I told him the SSCCE/question requirement would be true everywhere. Hmph.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com