M
Matteo
The following piece of code does not work:
final int fNum = num;
final Object[] fItems = items;
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
betterAddColumn(fNum,fItems);
}
});
It doesn't throws any exception but the contenents of the array are
totally scrambled up inside BetterAddColumn. The int value gives no
problems. Clearly the workaround for "local variable is accessed from
within the inner class; it needs to be declared final" does not work
for arrays.
Is it possible to to pass a vector to a inner class?
I need invokelater because of the swing synchronization event thread
problems modifying a JTable.
Thanks,
Matteo.
final int fNum = num;
final Object[] fItems = items;
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
betterAddColumn(fNum,fItems);
}
});
It doesn't throws any exception but the contenents of the array are
totally scrambled up inside BetterAddColumn. The int value gives no
problems. Clearly the workaround for "local variable is accessed from
within the inner class; it needs to be declared final" does not work
for arrays.
Is it possible to to pass a vector to a inner class?
I need invokelater because of the swing synchronization event thread
problems modifying a JTable.
Thanks,
Matteo.