can u add a JTable into an AWT ScrollPane and still have its column names displayed. though u can do it with a JScrollPane....but may be with a ScrollPane in AWT the table object is not allowed to process events posted on the column name...just a thought...this could be wrong.
I agree with Phil on this one, but if you really want to say "I did it myyyyy waaaaay" then add the JTable's JTableHeader first. (Or to be precise: put the JTableHeader and the JTable into a panel (by which I mean JPanel) and put that into the scroll pane).
put the JTableHeader and the JTable into a panel (by which I mean JPanel) and put that into the scroll pane).
That would work with scrolling: when you scroll down or up, the JTableHeader will scroll with the rows :-(
To the original point, mixing Swing and AWT components: there are some religions which hold that
you will be eventually punished for your sins (Judgment Day, and all that), while other religions believe
that sinning is simultaneously the punishment.
Your question is like asking "Can I stick a fork in an electrical socket?"
People would answer that you probably shouldn't, but then you'd tell them that you don't want advice, only answers. There's only one way to find out if you can stick a fork in an electrical socket and that's to try it.
So while you're trying the JTable/ScrollPane thing why don't you try the fork/socket thing too?