|
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class eseguibile extends Frame {
public static int WIDTH = 200;
public static int HEIGHT = 140;
public eseguibile (String lab ) {
super(lab);
setLocation(470,300);
setResizable(false);
add(lbl1);
lbl1.setOpaque(true);
add(tempo);
tempo.setFocusable(true);
JLabel lbl2 = new JLabel(" Decidi per quanto deve durare: ");
add(lbl2);
lbl2.setOpaque(true);
add(min);
add(ore);
add(giorni);
add(esci);
add(luca);
luca.setOpaque(true);
String bottone = E. getActionCommand();
if(bottone.equals("Min")) {
int minuti = Integer. parseInt(tempo. getText());
try {
setVisible(false);
int finale = (minuti * 60000);
f1.setSize(180,130);
f1.setLocation(470,320);
f1.setVisible(true);
p.add(fine);
p.add(prova);
p.add(appunto);
appunto.setText(motivo);
p.add(end);
p.add(rifai);
p.add(copy);
f1.add(p);
fine.setOpaque(true);
setVisible(true);
f1.setVisible(false);
}
});
String bottone = E. getActionCommand();
if(bottone.equals("Fine")) {
}
}
});
}
});
}
}
}
}
});
String bottone = E. getActionCommand();
if(bottone.equals("Ore")) {
int oore = Integer. parseInt(tempo. getText());
try {
setVisible(false);
int finale = (oore * 3600000);
f1.setSize(180,130);
f1.setLocation(470,320);
f1.setVisible(true);
p.add(fine);
p.add(prova);
p.add(appunto);
appunto.setText(motivo);
p.add(end);
p.add(rifai);
p.add(copy);
f1.add(p);
fine.setOpaque(true);
setVisible(true);
f1.setVisible(false);
}
});
String bottone = E. getActionCommand();
if(bottone.equals("Fine")) {
}
}
});
}
});
}
}
}
}
});
String bottone = E. getActionCommand();
if(bottone.equals("Giorni")) {
int gg = Integer. parseInt(tempo. getText());
try {
setVisible(false);
int finale = (gg * 86400000);
f1.setSize(180,130);
f1.setLocation(470,320);
f1.setVisible(true);
p.add(fine);
p.add(prova);
p.add(appunto);
appunto.setText(motivo);
p.add(end);
p.add(rifai);
p.add(copy);
f1.add(p);
fine.setOpaque(true);
setVisible(true);
f1.setVisible(false);
}
});
String bottone = E. getActionCommand();
if(bottone.equals("Fine")) {
}
}
});
}
});
}
}
}
}
});
String bottone = E. getActionCommand();
if(bottone.equals("Esci")) {
}
}
});
}
return null;
}
public static void main (String [] args ) {
JOptionPane. showMessageDialog(null, "Consultare il ReadMe:\nprima di utilizzare il programma", "Start", JOptionPane. WARNING_MESSAGE);
eseguibile frame = new eseguibile("JSveglia");
}
});
frame.setSize(WIDTH, HEIGHT);
frame.show();
}
}
|
|