English 中文(简体)
如果只有很少几行(或表层)的话,我如何确定表层的底色(和右边)?
原标题:How can I set the background color below (and to the right) of table cells if there are few rows (or colums)?
  • 时间:2012-01-13 12:46:41
  •  标签:
  • swing

i have jtable with 5 rows but the size of jtable is more than the jtable containing 10 rows. when i used table.setBackground(), only 5 rows are colored and rest part is uncolored.

我想在整张桌上打着色。

如何确定这一问题?

提前感谢。

问题回答

或者,通过使用<条码>可操作的#setFillsViewportHala(真实)方法,使表格填满整个观察港。 这将解决你的背景肤色问题,并具有下文所述的其他优势:。 关于<条码>的可的研读

你在下表中再次看到的可能是包含JTable的JCrollPane观点的背景。

提出这种观点的背景:

scrollPane.getViewPort().setBackground(Color.white);




相关问题
auto abbreviating JLabel

Anyone written a JLabel (extension/util/??) that automatically abbreviates the contents depending on it s preferred/visible size? much appreciated.

how can install swing/matisse on eclipse?

i tried this link: http://downloads.myeclipseide.com/downloads/products/eworkbench/discovery-6.0/ but i m fail how is this?

Java JTextField with input hint

I would like to add a hint value to my javax.swing.JTextField. It should look like Firefox rendering of <input type="text" title="bla">. This creates an edit field with the text bla in the ...

Swing Generator

I need to develop some java gui using swing. A few years ago I did develop a bit with swing. But it was pretty exhausting, you see, back than there weren t much tools to help you. But I do believe ...

Create a ImageIcon that is the mirror of another one

I ll like to know if there is a way to create a ImageIcon that is the mirror of another ImageIcon. Searching on Google, I found how to do it by using many AWT libraries. Is there a way to do it with ...

热门标签