Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Col Width with JTable

 
Danie Van Eeden
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings, I am very new to this forum and to JAVA.
I added a JTable to a form (JFrame extension). I got to add data to the table without much trouble. However, I cant see half of it! In each cell i only get "..." (three fullstops). When I click on it, i can sometimes see the value though. It seems as thought the cells are big enough but that the text area inside is too small.
help!!!
would be appreciated
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm going to move this to the Swing/AWT Forum, where it will certainly get more attention.
 
Wayne L Johnson
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using JTables can be a bit tricky; you might want to read more about them in the Sun JTable tutorial.
Can you re-size the columns? Assuming you can, do you see the full/correct data after re-sizing them?
Here are a few tips to keep in mind.
  • Make sure you put the JTable in a "JScrollPane" so you have scroll bars around your table data.
  • Consider turning off auto-resize of the columns, i.e., myTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);


  • Good luck ...
     
    Danie Van Eeden
    Greenhorn
    Posts: 13
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    appreciate the help
    thanks
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!