Line 1 of your snippet defines a class CustomDialog that inherits JDialog characteristics.
Line 3 of your snippet is an empty CustomDialog constructor.
Line 4 is a signature for a method within CustomDialog called getValidatedText()
One would instantiate your class CustomDialog with
CustomDialog customDialog = new CustomDialog();
I'm not sure what you're asking beyond those basics.
Learning Java using Eclipse on OpenSUSE 11.2
Linux user#: 501795
How do you create any class? Somewhere you need code like:
That would probably be executed when you click on a button.
Instead of asking all these questions and not replying when you get answers its time you start posting a SSCCE with your question that shows what you've attempted.
Rob Camick wrote:How do you create any class? Somewhere you need code like:
That would probably be executed when you click on a button.
Instead of asking all these questions and not replying when you get answers its time you start posting a SSCCE with your question that shows what you've attempted.
There was a missing file, I didn't realize sorry, however I'm still getting compilation errors with both .java files in place:
C:\Documents and Settings\Jon\workspace\JavaDev\myCode Snippets\DialogDemo.java:64: cannot find symbol
symbol : class CustomDialog
location: class components.DialogDemo
CustomDialog customDialog;
^
C:\Documents and Settings\Jon\workspace\JavaDev\myCode Snippets\DialogDemo.java:70: cannot find symbol
symbol : class CustomDialog
location: class components.DialogDemo
customDialog = new CustomDialog(frame, "geisel", this);
Greg Brannon
Bartender
Joined: Oct 24, 2010
Posts: 530
posted
0
You need to provide more info. We can't guess why you're getting an error - other than for the obvious reasons stated in the error - without seeing the code causing the error.
I'm going to guess that you don't have a CustomDialog constructor that matches your instantiation of a CustomDialog, but that's a guess.
Greg Brannon wrote:You need to provide more info. We can't guess why you're getting an error - other than for the obvious reasons stated in the error - without seeing the code causing the error.
I'm going to guess that you don't have a CustomDialog constructor that matches your instantiation of a CustomDialog, but that's a guess.
Nevermind, it seems to work when I launch the JNLP from their website, and, I'm not sure what is wrong with my copy and paste