I'm sure that it is possible, yes, but the real question would be why? There is probably a more appropriate arrangement of your UI elements that would be less troublesome.
When embedding components into a JTable, there are many cases where you will have to make sure events are forwarded along to the embedded component so they behave as you expect them to. JButtons and click events as an example of this. The JTable will process these events for itself first and may not pass them along to your component as you would expect.
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
Tell us exactly what your UI is to accomplish so that we might possibly find a better alternative for you other than inserting a table into a table.
Unless you mean just merge two tables?
Phaelax
Practically a Posting Shark
858 posts since Mar 2004
Reputation Points: 92
Solved Threads: 51
What is the intended purpose of the blank row? It doesn't sound as if you need to insert another table for anything.
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
I need a long string of information to be placed in the blank row, do you have any suggestions if you don't think that I need a another table inserted there
Even inserting another table in the row will not produce the effect you want, which I assume is a cell that spans all of the columns. The JTable just isn't put together that way.
It may be possible to create your own implementations of TableModel and TableColumnModel (which may or may not require further extension of JTable and JTableHeader, but I am thinking it wouldn't), which effectively manage two separate models for the table to display. That is the only way I can see you getting the desired effect if you must stick with a JTable.
If you don't need the info on the blank row to be visible at all times, but rather when a data row is selected, you could place that info in a separate text area.
If you need to maintain the spreadsheet-type feel and interaction is limited to navigation, JEditorPane or JTextPane with HTML might work out for you, since that output would be easy with HTML tables and HyperlinkListener can be used to provide some interactivity with the data.
Those are the only suggestions that come to mind without knowing the full scope of your data display and interaction needs.
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
The same way you'd do it for placing any other type of component in a cell. I'd suggest reading up on table cell renderer, do a little google searching and see what you come up with.
Phaelax
Practically a Posting Shark
858 posts since Mar 2004
Reputation Points: 92
Solved Threads: 51