This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
What is DefaultOutlineCellRenderer? Is it the netbeans class?
If so your problem could be because this class adds a border to indent the text an amount. If you want to provide all your own settings for the returned JLabel then rather than calling super.getTableCellRendererComponent(..) just create a JLabel, configure as you require and return that.
To save unnecessarily creating loads of new JLabels it would be better to create 1 JLabel, store it in an instance variable and reuse it.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: NB Platform - Vertical align in OutlineView