Hello again. I did what you said and it still gave me those same 3 errors. I 
have been using a Java swing book beginners guide for this course. I didn't do 
so very well in programming part 1. My desire is not to be a programmer but a 
project manager but I understand that you need to know all of the aspects. This 
particular program also ask to use a mortage tax calculator in the program as 
well. The only trouble that I have with that is once errors are complete, where 
would incorporate the tax calculator. Do you know of any websites that would 
have examples of that. Any help would be greatly appreciated. 

"Vohra, Sandeep Singh" <[EMAIL PROTECTED]> wrote:  Shawn - On first glance 
these are the main issues which you should fix..

-Please put a semi colon after line 3 and comment html code within Java
Comments.

- Curly Braces for method - 'public void init()' should start after this
line like this - 

public void init() { 


Similarly please close the brace for a method before the next method
(public void start () ) starts..

I have tried to fix it without compiling it. It would be better if you
compile now and check the errors and try to resolve them..This way you
would learn even better.

I will try to fix your program as soon as I get time but meanwhile if
you are working..keep on trying ..

-Sandy Vohra


-----Original Message-----
From: Shawn Barnes [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 04, 2006 10:45 PM
To: Java
Subject: Re: Programming Java in Coldfusion

What's up Jason? I had a question about a java program. I am currently
taking Java at the Univ of Phoenix. I have a J Applet program design and
I have to insert a GUI. Also a mortage tax calculator has to be
attached. I have 3 errors that i can't find. I used text pad to run my
program. The errors are on lines 4, 16, and 87. I am fairly new to using
Java and I have a java swing book that I have been following. Any help
or advice will be greatly appreciated. Thanks.

import javax.swing;
import java.awt;
import javax.awt.event;
//This HTML can be used to launch the applet:
//  

  
//

public class MyApplet extends JApplet
{ JButton jbtnOne;
JButton jbtnTwo;
JLabel jlab;

//Called first.
public void init()
{
try {

SwingUtilities.invokeAndWait (new Runnable ()
public void run () {
guiInit (); // intialize the GUI
}
});
} catch (Exception exc) {
System.out.println("Can't create because of "+ exc);
}
}

//Called second, after init (). Also called
//whenever the applet is restarted.
public void start ()

//Called when the applet is stopped.
public void stop () {
// Not used by this applet.
}
//Called when applet is terminated. This is
//the last method executed.
public void destroy() {
// Not used by this applet
}
// Set up and intialize the GUI.
private void guiInit() {
// Set the applet to use flow layout.
setLayout (new FlowLayout());
// Create two buttons and a label.
jbtnOne = new JButton ("One");
jbtnTwo = new JButton ("Two");
jlab = new JLabel ("Press a button.");
// Add actions listeners for the buttons.
jbtnOne.addActionListner(new ActionListner () {
public void actionPerformed(ActionEvent le {
// jlab.setText ("Button One pressed.");
System.out.println("stop() called...") ;
}
} );
jbtnTwo.addActionListener (new ActionListener () {
public void actionPerformed (ActionEvent le {
jlab.setText ("Button One pressed.");
}
});
jbtnTwo.addActionListener (new ActionListener () {
public void actionPerformed(ActionEvent le) {
jlab.setText ("Button Two pressed.");
}
});
//Add the components to the applet's content pane.
getContentPane().add(jbtnOne);
getContentPane().add(jbtnTwo);
getContentPane().add(jlab);
}




Jason West wrote:
I was going to suggest Eclipse as well with CFEclipse. It has been
incorporated as a standard IDE with plug in at both Cingular wireless
and
AIG for doing development with both JAVA and CFML.

/jlw


On 11/1/06, James Holmes wrote:
>
> The manual is good for this:
>
> http://livedocs.macromedia.com/coldfusion/7/htmldocs/00001557.htm
>
> You'd be better off using Eclipse to do Java and CF (via the CFEclipse
> Plugin) in the same IDE.
>
> On 11/1/06, Henry Wright wrote:
> > I am fairly new to coldfusion and would like to know how I can go
about
> programming java code in coldfusion. I have a number of CFC's that I
have
> created and would prefer to use java and the java framework. Is this
> possible?
> >
> > I am using BlueJ at the moment when I programme in Java and I use
> Dreamweaver when I programme in CF. Can I use Dreamweaver and combine
the 2
> languages?
>
>
> --
> CFAJAX/MXAJAX docs and other useful articles:
> http://www.bifrost.com.au/blog/
>
> 







~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: http://www.houseoffusion.com/groups/Java/message.cfm/messageid:3305
Subscription: http://www.houseoffusion.com/groups/Java/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.40

Reply via email to