Hi guys,
I encountered a weird bug in which a table within a template, placed in a container that’s not immediately visible (its visible property is bound to tabStrip.selectedTab) will have its headers with no margins:
If I mouse hover, then the margins appear:
Steps to reproduce using the exported templates below:
- Preview Mode: click on first tab ‘Container 1’.
- Save project (it will exit preview mode).
- Preview Mode: click on second tab ‘Container 2’, and don’t put your mouse over the table.
- The table headers won’t have margins.
- Preview Mode: put your mouse over the table.
- The margins will appear.
Bug-export.zip (10.4 KB)
My current workaround is to run the following script when Container2 (and therefore the table) becomes visible:
from javax.swing import SwingUtilities
jtable = x.getTable()
tableHeader = jtable.getTableHeader()
SwingUtilities.updateComponentTreeUI(tableHeader)