execute paint(g, c) of invisible jtable

is it possible to execute paint(g, c) when table.setVisible(false)...

i need this because i have 2 jtable

1. editable jtable for editing & display purpose in the app

2. hidden jtable for printing. this one is customized first table

which include report header-like text, merging columns for summary, etc

when i printed the 2nd table via table.print(mode,header,footer) i got only outer border...

so then i realized that paint(g, c) is called automatically only when table is visible...

so is it possible painting invisible jtable...

i've tried repaint(), updateUI() but nothing happened.

or maybe there's a better solution.

thank's

[705 byte] By [shy_guya] at [2007-11-26 19:18:49]
# 1

As a workaround:

- Display a temporary frame with the table & header in it (that gets around the isVisible() problem), and popup a modal dialog over the temporary frame that says "printing, please wait...." (that way the user cannot interact with the table because the modal dialog blocks them).

- Once it is sent to the printer then close the modal dialog and the temporary frame.

jvaudrya at 2007-7-9 21:34:29 > top of Java-index,Desktop,Core GUI APIs...