Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URL

 
sae0203
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello... so long didn't visit here liao...
anyway... hello to everyone...
in the meantime, can someone help me with my applet???
//----------- START ---------------
import java.awt.*;
import java.net.*;
import java.applet.*;
import java.awt.event.*;
//import wildtangent.webdriver.*;
public class Sae1 extends Applet implements ActionListener{

Button B1;
Button wtBtn;
URL input;

public void init()
{
B1 = new Button("EXIT");
B1.addActionListener(this);

wtBtn = new Button("WTStart");
wtBtn.addActionListener(this);

//Is this how i setup a path address??
input = new URL("http://www.yahoo.com");

add(B1);
add(wtBtn);
//add(input); // i assure i do not have to add it
}
public void actionPerformed(ActionEvent evt)
{
Object src=evt.getSource(); //returns object that caused event
//or is this another way to set urlfield
//urlField.setText("http://www.yahoo.com");
if(src==B1)
{
destroy();
}
if(src==wtBtn) // meaning the wtStart button
{
//can't get it to load a new window... wonder why
showWindow(input);
//getAppshowDocument("http://www.yahoo.com");
}
}

//end method actionPerformed()

public void paint(Graphics g)
{
g.drawString("Sharon Ambrosia Try Out", 50, 60);
}

public void destroy()
{
System.exit(0); // i set allow all permissions in the meeantime but what should be the correct way of doing it?
//repaint();
}

}
1.) How do i pop up a new window when user click on the wtStart button
2.) What is the correct way to close all window when the exit button is depressed. COZ now, i allow all permission.
3.) and has anyone heard of wildtangent and used it before???
coz, i had trouble importing the webdriver and i am sure my path is right. is it because i am using JCreator instead of Visual J++?
SAE - Thank you all in advance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic