| Author |
Problem printing JPanel in JTable
|
Sheila Wallace
Greenhorn
Joined: May 24, 2001
Posts: 10
|
|
I have a strange problem when pritning. I am printing a JTable by printong each table cell individually. In order to do this I call print(graphics) on the component within the table cell. One of the cells of the JTable contains a JPanel which contains 2 JLabels. No matter what I do, the JLabels within the JPanel will not print. The clip bounds passed to the component are correct as I can draw them ok. If I change the cell to contain only a JLabel it will print correctly, but as soon as I put it inside a JPanel the JLabel will not print. Any ideas?
|
 |
Eddie Vanda
Ranch Hand
Joined: Mar 18, 2003
Posts: 281
|
|
|
What layout manager are you using in your JPanel?
|
The nice thing about Standards is that there are so many to choose from!
|
 |
Sheila Wallace
Greenhorn
Joined: May 24, 2001
Posts: 10
|
|
I am using BorderLayout but have tried changing it to FlowLayout, GridLayout etc and still no joy. If you pass clip bounds to a Container, how does it translate those for it's children?
|
 |
 |
|
|
subject: Problem printing JPanel in JTable
|
|
|