Results 1 to 3 of 3
Thread: JDialog Gradient Background
- 01-22-2013, 05:55 PM #1
Member
- Join Date
- Jan 2013
- Posts
- 9
- Rep Power
- 0
JDialog Gradient Background
Hi,
I have created an AboutDialog that extends JDialog. I would like to have it have a Gradient Background, but when I add the paintCompnent function and try and call super.paintComponent, the complier is telling me that "The method paintComponent(Graphics) is undefined for the type JDialog". Any ideas how to get JDialog to have a Gradient Background? Or is it just not supported?
- 01-22-2013, 05:59 PM #2
Re: JDialog Gradient Background
Read the API for JDialog (and also for the RootPaneContainer interface it implements) and you'll understand where you have to do the custom painting.
This tutorial may also help: Lesson: Performing Custom Painting (The Java™ Tutorials > Creating a GUI With JFC/Swing)
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 01-22-2013, 07:39 PM #3
Member
- Join Date
- Jan 2013
- Posts
- 9
- Rep Power
- 0
Similar Threads
-
Gradient of an image
By Sapan in forum Forum LobbyReplies: 1Last Post: 04-08-2011, 03:03 PM -
Gradient Filter problem
By alanchan in forum Java 2DReplies: 0Last Post: 11-24-2010, 08:50 AM -
JComponent gradient background
By snipered in forum AWT / SwingReplies: 0Last Post: 12-30-2008, 12:38 AM -
CLabel Gradient Background
By Java Tip in forum SWTReplies: 0Last Post: 07-11-2008, 04:39 PM -
Color gradient
By Java Tip in forum java.awtReplies: 0Last Post: 06-21-2008, 08:50 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks