Call another class (Java)

0

How do I call a "class" of type jFrame for example from my main class? My jFrame has its own main that gives the setVisible true for it to appear, however I wanted to access this main from my main class, so I can setVisible through the main one instead of creating an instance of that and giving the setVisible by my class, even because it loses frame design quality.

    
asked by anonymous 05.06.2016 / 05:53

2 answers

0

Well, if you instantiate the class you can access it, main class:

public static void main(String args[])
     {
        Aluno estudante = new Aluno();//Aluno é outra classe.

Was this your question?

    
05.06.2016 / 07:12
0

I've already managed to call main from another class through its main class:

ClassName.main (args);

    
05.06.2016 / 18:33