/** Muestra la ventanad de acerca de */ private void mostrarAcercaDe() { AcercaDeView locAcercaDeView = new AcercaDeView(this.principalView); locAcercaDeView.setIconImage( Facturacion.getInstance() .getAdminRecursos() .getImage(Recursos.PRINCIPAL_MENU_UTILIDADES_ACERCADE)); locAcercaDeView.setVisible(true); }
public static void main(String[] args) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { e.printStackTrace(); } LoginController locLogin = new LoginController(Facturacion.getInstance().principalView); locLogin.getModel().addUsuarioLoggeadoListener(new CambioUsuarioListener()); }
private void initComponents() { this.setTitle("Jano - Sistema de Facturación"); this.setIconImage(Facturacion.getInstance().getAdminRecursos().getImage(Recursos.LOGO_JANO)); JLabel locLblTituloEmpresa; JLabel locLblTituloJano; JLabel locLblUsuario; JLabel locLblClave; locPnlPrincipal = new JPanel(); locLblTituloEmpresa = new JLabel(); locLblUsuario = new JLabel(); locLblClave = new JLabel(); tfUsuario = new JTextField(); btnCancelar = new JButton(); tfClave = new JPasswordField(); btnEntrar = new JButton(); locLblTituloJano = new JLabel(); locPnlPrincipal.setBackground(COLOR_BACKGROUND); locLblTituloEmpresa.setIcon( Facturacion.getInstance().getAdminRecursos().getIcon(Recursos.LOGIN_LOGO)); locLblUsuario.setFont(FUENTE_LABELS); locLblUsuario.setForeground(Color.WHITE); locLblUsuario.setText("Usuario"); locLblClave.setFont(FUENTE_LABELS); locLblClave.setForeground(Color.WHITE); locLblClave.setText("Contraseña"); btnCancelar.setBackground(Color.WHITE); btnCancelar.setFont(FUENTE_BOTONES); btnCancelar.setForeground(COLOR_BACKGROUND); btnCancelar.setText("Salir"); btnEntrar.setBackground(Color.WHITE); btnEntrar.setFont(FUENTE_BOTONES); btnEntrar.setForeground(COLOR_BACKGROUND); btnEntrar.setText("Entrar"); locLblTituloJano.setIcon( Facturacion.getInstance().getAdminRecursos().getIcon(Recursos.LOGIN_TITULO)); GroupLayout layoutPnlPrincipal = new GroupLayout(locPnlPrincipal); locPnlPrincipal.setLayout(layoutPnlPrincipal); layoutPnlPrincipal.setHorizontalGroup( layoutPnlPrincipal .createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup( layoutPnlPrincipal .createSequentialGroup() .addGap(71, 71, 71) .addGroup( layoutPnlPrincipal .createParallelGroup(GroupLayout.Alignment.TRAILING) .addComponent(locLblUsuario) .addComponent(locLblClave)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup( layoutPnlPrincipal .createParallelGroup(GroupLayout.Alignment.LEADING, false) .addComponent(tfClave) .addComponent( tfUsuario, GroupLayout.DEFAULT_SIZE, 165, Short.MAX_VALUE)) .addContainerGap(66, GroupLayout.PREFERRED_SIZE)) .addComponent( locLblTituloEmpresa, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup( layoutPnlPrincipal .createSequentialGroup() .addGap(103, 103, 103) .addComponent(btnEntrar) .addGap(36, 36, 36) .addComponent( btnCancelar, GroupLayout.PREFERRED_SIZE, 65, GroupLayout.PREFERRED_SIZE) .addContainerGap(105, Short.MAX_VALUE)) .addGroup( GroupLayout.Alignment.TRAILING, layoutPnlPrincipal .createSequentialGroup() .addContainerGap(41, Short.MAX_VALUE) .addComponent( locLblTituloJano, GroupLayout.PREFERRED_SIZE, 301, GroupLayout.PREFERRED_SIZE) .addGap(34, 34, 34))); layoutPnlPrincipal.setVerticalGroup( layoutPnlPrincipal .createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup( layoutPnlPrincipal .createSequentialGroup() .addGap(19, 19, 19) .addComponent(locLblTituloJano) .addGap(18, 18, 18) .addComponent(locLblTituloEmpresa) .addGap(29, 29, 29) .addGroup( layoutPnlPrincipal .createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(locLblUsuario) .addComponent( tfUsuario, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup( layoutPnlPrincipal .createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(locLblClave) .addComponent( tfClave, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addGap(26, 26, 26) .addGroup( layoutPnlPrincipal .createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(btnEntrar) .addComponent(btnCancelar)))); GroupLayout layout = new GroupLayout(this.getContentPane()); this.getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent( locPnlPrincipal, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)); layout.setVerticalGroup( layout .createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(locPnlPrincipal, GroupLayout.DEFAULT_SIZE, 336, Short.MAX_VALUE)); pack(); }