import java.awt.event.*;
import java.awt.Event.*;
import java.util.Timer;
import javax.swing.*;
import java.awt.*;
import java.util.*;
public class ASS extends javax.swing.JFrame {
public ASS() {
initComponents();
}
public int x,y,i;
javax.swing.Timer timerone = new javax.swing.Timer(1000, new ActionListener() {
public void actionPerformed(ActionEvent e) {
x = lbl1.getX(); //get x value for label
y = lbl1.getY(); //get y value for table
lbl1.setSize(159,105); //set size of label
lbl1.setLocation(x+1, y+1); //Set location of label +
// i = i+ 1;
// lblTime.setText(Integer.toString(i + 1));
}
});
COde for start button
Mars.start();
Mars.setDelay(50);
public static void main(
String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new ASS().setVisible(true);
}
});
Theres the code im using a gui designer for the labels and button etc. cheers