-
Paint method problem
Ive created an applet in java for which displays images on a canvas, it also has panels for the buttons and components. I have used the paint method for displaying the images. The problem I'm haveing is that when I run the applet the panels are painted over, such that only the buttons are visible but the panels borders are just painted over.
-
maybe you have something in the paint methond before you painted the panals that is painting over them maybe look and move stuff around
-
Been there, never done that...
Tie Ninja is absolutely right, but getting around this problem is difficult...
Ive coded java for 10 years and I have never been able to do that properly, but, if you manage then please let me know how you did it.
Until then I proclaim (hehe) :
You should not add standard components to a container where you have
overridden the paint method.
I advise you to set up your applet with a borderlayout, and a panel in south
for your buttons and in the center you add your own panel extension (where
you have overridden the paint method).
eschew obfuscation
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
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
|
Bookmarks