I have implemented the following code :
-----------------------------------------------------------------------------------------------------------------
import javax.swing.*;
import java.awt.*;
public class FileChooseDemo{
public static void main(String args[])
{
JFileChooser chooser = new JFileChooser();
chooser.showOpe nDialog(new JFrame());
}
}
------------------------------------------------------------------------------------------------------------------
But my problem is that i want to implement the same with help of an applet so that i can use it in a browser , can anyone help me solve that and i've already written some code but it is not working........ ...check this modified code below:
import javax.swing.*;
import java.awt.*;
public class FileChooseDemo extends JApplet{
public void init(){
JFileChooser chooser = new JFileChooser();
chooser.showOpe nDialog(new JFrame());
}
public static void main(String args[])
{
javax.swing.Swi ngUtilities.inv okeLater(new Runnable() {
public void run() {
init();
}
});
}
}
}
/* <applet code="FileChoos eDemo.class" height=400 width=400></applet>*/
help me please!
-----------------------------------------------------------------------------------------------------------------
import javax.swing.*;
import java.awt.*;
public class FileChooseDemo{
public static void main(String args[])
{
JFileChooser chooser = new JFileChooser();
chooser.showOpe nDialog(new JFrame());
}
}
------------------------------------------------------------------------------------------------------------------
But my problem is that i want to implement the same with help of an applet so that i can use it in a browser , can anyone help me solve that and i've already written some code but it is not working........ ...check this modified code below:
import javax.swing.*;
import java.awt.*;
public class FileChooseDemo extends JApplet{
public void init(){
JFileChooser chooser = new JFileChooser();
chooser.showOpe nDialog(new JFrame());
}
public static void main(String args[])
{
javax.swing.Swi ngUtilities.inv okeLater(new Runnable() {
public void run() {
init();
}
});
}
}
}
/* <applet code="FileChoos eDemo.class" height=400 width=400></applet>*/
help me please!
Comment