等到引入JFrame上的值

时间:2018-02-24 22:24:03

标签: java swing jframe

我有一个程序首先显示一个登录屏幕,我需要一种方法让我的代码等到用户正确登录,以便将生成的User对象发送到用户所需的屏幕。< / p>

public class ProgramaCliente {
public static void main (String[] args) {
    VentanaLoggeo vLog = new VentanaLoggeo(); // a log in screen
    vLog.setVisible(true);

    MonedaDAO mDAO = new MonedaDAO(); // a data access object for cryptocurrencies
    InversionDAO iDAO = new InversionDAO(); // a data access object for the crytocurrencies that the user bought
    Usuario user = vLog.getUsuario(); // the user that the log in screen should return

    VentanaCliente vCliente = new VentanaCliente(user,mDAO,iDAO); // -Main screen-  a screen that lets the user manipulate it's cryptocurrencies
    vCliente.setVisible(true);
}

如果没有在日志屏幕上显示主屏幕,有没有办法这样做?

0 个答案:

没有答案