View Single Post
  #8 (permalink)  
Old 01-07-2009, 04:31 AM
Fubarable's Avatar
Fubarable Fubarable is offline
Moderator
 
Join Date: Jun 2008
Posts: 6,451
Rep Power: 8
Fubarable is on a distinguished road
Default
Originally Posted by geeeeky.girl View Post
- First and foremost, will I be able to associate events, any and all types of events, with the different cells of the JTable grid afterwards, "headers" included?
Yes.
Quote:
- How do you make a JTable without column headers?
If you add a JTable to a JPanel, its standard behavior is to appear without column headers. You must either add the table headers explicitly such as to the NORTH pane in a BorderLayout container or add the JTable to a JScrollPane. So in other words, this should not be a problem for you.
Quote:
- How do you make a JTable with list "headers"?
so you want "row" headers? If so, I don't believe that this is standard behavior for a JTable, but having said this, I've seen on Google and Sun Java Forum searches several examples of how to do this.
Quote:
- How do you choose the individual size of a specific line or column?
That's all part of the JTable API.

Quote:
Oh yeah, last question. If I have another part of the window where I'd like to include a few words, i.e., some text (and this has nothing to do with the JTable, this would be a separate "component"), what's the simplest/best way to create a border around it? (Could you give me a few lines of code?)
I'd place it in its own JPanel and call setBorder(BorderFactory.createLineBorder(....)); on the JPanel.
Reply With Quote