I have the following code in the constructor of my JFrame class.
The problem is i want to color the JPanel so I can see it when I add other panels (to help me w/doing layout stuff).
public void windowClosing(WindowEvent anEvent)
Why wont the panel color turn red?????
Attention everyone, I have an announcement
I am an IDIOT!!!!!
I guess if i want to change the color of the actual JPanel, I should use the .setbBackground method, instead of the .setForeground method.
Isnt it crappy how the stupidest little mistakes can drive you crazy for hours!
I'm glad you found your own mistake.
If you are having difficulty building layouts, why not try a better layout system?
I encourage you to try the Oculus Layout System at javalayout.com.
It makes creating layouts with Swing fast and easy. Things stretch and align the way you'd expect, and there is no need to understand or use complicated constraints. It comes with a visual drag-and-drop GUI builder for immediate layout design feedback. It generates Java code which is simple and organized. This makes it readable and maintainable.
It has saved me tons of time building GUIs!
You must be a sales man for that layout designer... The only 2 posts that you've done are pushing for people to try that. Better yet, its like you copied one post, and pasted it to another thread...
I don't think these boards are for advertisement purposes.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL