How do i set different color for different row in GridBagLayout?
P.S : I cannot use swing in my app a开发者_JS百科s client requirement.
for AWT works setBackground(Color)
too
A GridBagLayout has nothing to do with the color of any row or component added to a panel that uses a GridBadLayout as the layout manager. If you want different color rows, then you need to create a separate panel for every row of components and set the background color of the panel.
精彩评论