GridLayout, BackgroundColor

I have a JPanel with a GridLayout, which contains 3rows and 3 cols of JToggleButtons:
        setLayout(new java.awt.GridLayout(iMax,jMax,0,0));

The backgroundcolor of the JoggleButtons is currently white.

When compiled in Eclipse, there are grey lines in between the JoggleButtons, when compiled
in NetBeans there are no such lines.

How can I assure that those lines are not displayed?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The location where you compiled it shouldnt matter, do you mean its showing as different in the gui designers? You need to set the background on the content pane to be white as well:

muliLessaAuthor Commented:
Thx, colr!
...its showing as different in the gui designers: Yes, therefore I think that "something is missing"
in my code, which is "added" in NetBeans, but not in Eclipse.

I tried Your solution, but getContentPane() does not work for a JPanel.
Sorry, try setting the background directly on the JPanel instead
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

muliLessaAuthor Commented:
I am doing that (see above: this.setBackground(Color.white);
this is a class which extends JPanel).

I guess that perhaps the background of the gridlayout should be set - but
I don't know how to achieve that.
I suspect it is more likely to be the component which the JPanel has been added to, the content pane of the window itself
muliLessaAuthor Commented:
The component which contains the JPanel is a LayeredPane, which has (needs to have) the BG-color brown - so it can't be responsible for the grey lines between the gridcomponents.
Mick BarryJava DeveloperCommented:
are they both running on the same os?  could be different l&f
set the l&f explicitly if thats the case

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
muliLessaAuthor Commented:
Thx objects! That's it!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.