É uma duvida besta, mas é que é a primeira vez q usei o netbeans para fazer esse tipo de coisa. Seguinte, criei um crud com o netbeans, o .class que tem o MAIN chama o frame o frame q mostra so dados, então criei uma tela de login, e não to conseguindo chamar essa classe que chama po frame..
Aqui a classe:/*
* AgendaTributariaApp.java
*/
package agendatributaria;
import org.jdesktop.application.Application;
import org.jdesktop.application.SingleFrameApplication;
/**
* The main class of the application.
*/
public class AgendaTributariaApp extends SingleFrameApplication {
/**
* At startup create and show the main frame of the application.
*/
@Override protected void startup() {
show(new AgendaTributariaView(this));
}
/**
* This method is to initialize the specified window by injecting resources.
* Windows shown in our application come fully initialized from the GUI
* builder, so this additional configuration is not needed.
*/
@Override protected void configureWindow(java.awt.Window root) {
}
/**
* A convenient static getter for the application instance.
* @return the instance of AgendaTributariaApp
*/
public static AgendaTributariaApp getApplication() {
return Application.getInstance(AgendaTributariaApp.class);
}
/**
* Main method launching the application.
*/
public static void main(String[] args) {
launch(AgendaTributariaApp.class, args);
}
}
String user = this.campoUser.getText();
String senha = this.campoSenha.getText();
if((user == null ? "admin" == null : user.equals("admin")) && (senha == null ? "admin" == null : senha.equals("admin"))){
AgendaTributariaApp a = new AgendaTributariaApp();
//AQUI QUE EU QUERO CHAMAR A CLASSE QUE CHAMA O FRAME
}
else{
JOptionPane.showMessageDialog(null, "Usuário ou Senha Inválidos");
}