• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet Error

 
Shiva Mohan
Ranch Hand
Posts: 486
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
I am new to Java.I am trying to understand Applet's JColorChooser from the below program.But the program is showing error that i couldn't figure out.Please help me.



Thanks.

EDIT by mw: Added Code Tags to original poster's indentation.
[ January 05, 2006: Message edited by: marc weber ]
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by SP Mohan:
...the program is showing error that i couldn't figure out.Please help me...

Hi SP,

Welcome to JavaRanch!

First, note that I added Code Tags to your post. This keeps your formatting intact. Also, you will probably want to include your import statements with your code to make it easier for others to test...
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

And it helps if you post the error message you're getting.

Now, my guess is you're having a problem with this line:
JDialog d=theChooser.createDialog(JApplet.this, ...

I believe you want:
JDialog d=theChooser.createDialog(ColorDialog2.this, ...

(Also see Sun's tutorial on using JColorChooser.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic