J
JTL.zheng
how to change a Swing app to a JApplet?
what should I change in codes?
in my swing app my entrance is like:
public static void main(String[] args) {
// call in EDT
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
new UI();
}
});
}
and I write my JApplet like this:
public class Applet extends JApplet {
private static final long serialVersionUID = -3683798728718521374L;
public void init() {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
new UI();
}
});
}
}
but it doesn't work....
what code should I change?
Thank you very much in advance
what should I change in codes?
in my swing app my entrance is like:
public static void main(String[] args) {
// call in EDT
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
new UI();
}
});
}
and I write my JApplet like this:
public class Applet extends JApplet {
private static final long serialVersionUID = -3683798728718521374L;
public void init() {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
new UI();
}
});
}
}
but it doesn't work....
what code should I change?
Thank you very much in advance