How to add image background on JTable , that does not scroll when scrolling JTable

前端 未结 2 388
难免孤独
难免孤独 2021-01-14 07:56

I need to add an image background behind my JTable, should not scrole down while scrolling my JTable. currently i have added a Image behing my JTable. using the paint method

2条回答
  •  忘掉有多难
    2021-01-14 08:35

    • you can painting JTable's backgroung, same/similair as for rest of JComponents

    • you have to override paintComponent() instead of method paint()

    • example about paintComponent() including customized rows selection(s)

    • you can painting to the JXLayer(Java6), there is JLayer (Java7) also

    • you can painting to the GlassPane

    • you can painting to the JViewport

提交回复
热议问题