Hi (Salm)..

In my java code i have to insert a table into a text area, by choosing "insert table" from the menue "Insert" so then the program will ask me to enter the number of rows & cols to create the table with the numbers i've entered..
the image i need to insert it also from the same menue "insert" by choosing "insert Image".

honestly i've searched alot to find something that would help, but nothing found, hope some help..

Recommended Answers

All 4 Replies

Do you mean a JTable?
You can't put a JTable or an image inside a JTextArea. You need to create some kind of container, eg JPanel, then put your text area, table, image etc iside that.

sorry the power gone off since yesterday, and didn't see your relpy
mm what i'm attemding to do is a simple text editor with a jtextArea, and to add a jtable & image on the jtexArea? you said i can't do that! Isn't there any way else to do it with?

You need to create some kind of container, eg JPanel, then put your text area, table, image etc inside that.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.