M
Mariano
I've this class, Gestisci.java, when I initialize this class from
Crea.java class I need to pass an argument to the constructor so code
in class Crea.java will be something like that:
new Gestisci(myStringVariable).setVisible(true)
=======================================
//File: Gestisci.java
public class Gestisci extends javax.swing.JFrame {
private String tipo; // declare tipo
public Gestisci(String t) { // accept string
this.tipo = t; // "bind"
}
// START A METHOD
System.out.println(tipo);
// END METHOD
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Gestisci(???).setVisible(true); // AND HERE???
}
});
}
=======================================
Now my knowledge stop here, but, what I've to put in main at place of
'???' to correctly compile?
Crea.java class I need to pass an argument to the constructor so code
in class Crea.java will be something like that:
new Gestisci(myStringVariable).setVisible(true)
=======================================
//File: Gestisci.java
public class Gestisci extends javax.swing.JFrame {
private String tipo; // declare tipo
public Gestisci(String t) { // accept string
this.tipo = t; // "bind"
}
// START A METHOD
System.out.println(tipo);
// END METHOD
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Gestisci(???).setVisible(true); // AND HERE???
}
});
}
=======================================
Now my knowledge stop here, but, what I've to put in main at place of
'???' to correctly compile?