user966682
user966682

Reputation: 111

Different row color in gridbag layout

How do i set different color for different row in GridBagLayout?

P.S : I cannot use swing in my app as client requirement.

Upvotes: 0

Views: 3107

Answers (2)

camickr
camickr

Reputation: 324118

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.

Upvotes: 1

mKorbel
mKorbel

Reputation: 109813

for AWT works setBackground(Color) too

Upvotes: 1

Related Questions