I find JTable very irksome to use, since I almost always have to laboriously set the column widths to avoid having fields truncated, and it is very difficult to perform simple operations that people often find desirable, such as striping rows. So I decided to create my own table class that was easier to use rather than wasting any more time fighting with JTable. The basic idea is to use a gridbag layout to create a matrix of JLabels. This seems to work pretty well for the most part, but the problem is that when I set the fill to GridBagConstraints.BOTH I can't get the text in each data cell to be left justified; it keeps coming out centered. I would appreciate any help with this. My simplified table class is:
where GridBagPanel is a simple class that takes care of dealing with the GridBagConstraints (initializing fields to reasonable defaults) and lets me add components simply by invoking addComponent (x, y, width, height, component).
Thanks for the help.