// Constructor public DeleteArchiveFrame(AmazonGlacierClient client, String vaultName, int region) { super("Delete Archive"); int width = 200; int height = 170; Color wc = Color.WHITE; deleteClient = client; deleteVault = vaultName; JLabel label1 = new JLabel("ArchiveID to Delete from " + Endpoint.getTitleByIndex(region) + ":"); jtfDeleteField = new JTextField(100); jbtDelete = new JButton("Delete"); jbtBack = new JButton("Back"); JPanel p1 = new JPanel(); p1.setLayout(new FlowLayout()); p1.add(label1); p1.setBackground(wc); JPanel p2 = new JPanel(); p2.setLayout(new FlowLayout()); p2.add(jtfDeleteField); jtfDeleteField.addMouseListener(new ContextMenuMouseListener()); jtfDeleteField.setFocusable(true); p2.setBackground(wc); JPanel p3 = new JPanel(); p3.setLayout(new FlowLayout()); p3.add(jbtDelete); jbtDelete.addActionListener(this); jbtDelete.setBackground(wc); p3.add(jbtBack); jbtBack.addActionListener(this); jbtBack.setBackground(wc); p3.setBackground(wc); JPanel p4 = new JPanel(); p4.setLayout(new BorderLayout()); p4.setBackground(wc); p4.add(p1, BorderLayout.NORTH); p4.add(p2, BorderLayout.CENTER); p4.add(p3, BorderLayout.SOUTH); setContentPane(p4); // Prepare for display pack(); if (width < getWidth()) // prevent setting width too small width = getWidth(); if (height < getHeight()) // prevent setting height too small height = getHeight(); centerOnScreen(width, height); jtfDeleteField.setText(""); jtfDeleteField.requestFocus(); }
protected JPanel createPathPanel(String path) { JTextField tf = new JTextField(30); tf.setEditable(false); tf.setText(path); tf.setBackground(Color.WHITE); tf.setFocusable(false); JPanel pP = new JPanel(); pP.setLayout(new BoxLayout(pP, BoxLayout.X_AXIS)); pP.add(tf); return pP; }
protected JPanel createConnectionPanel(final ConnectionDetails cd, final String text) { JPanel cP = new JPanel(); cP.setLayout(new BoxLayout(cP, BoxLayout.X_AXIS)); JLabel lab1 = new JLabel(text + ": "); JTextField conField = new JTextField(25); conField.setText(cd.getUser() + "@" + cd.getHost()); conField.setEditable(false); conField.setFocusable(false); conField.setBackground(lab1.getBackground()); cP.add(lab1); cP.add(conField); return cP; }
/** Initialize the contents of the frame. */ private void initialize() { frmSignIn = new JFrame("Login"); frmSignIn.setTitle("Sign in"); frmSignIn.setResizable(false); frmSignIn.setBounds(100, 100, 450, 357); frmSignIn.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frmSignIn.setLocationRelativeTo(null); JLabel lblEmail = new JLabel("Email:"); lblEmail.setBounds(73, 108, 56, 18); JLabel lblPassword = new JLabel("Password:"******"Show Password"); chckbxShowPassword.setBounds(130, 176, 128, 23); frmSignIn.getContentPane().add(chckbxShowPassword); chckbxShowPassword.addItemListener( new ItemListener() { public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { passwordField.setEchoChar((char) 0); } else { passwordField.setEchoChar(a); } } }); JButton btnNewButton = new JButton("Sign in"); btnNewButton.setBounds(325, 106, 72, 62); btnNewButton.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { username = textField.getText(); String password = String.valueOf(passwordField.getPassword()); // getText() // is // deprecated; // changed // to // getPassword() // password.toLowerCase(); Do we want case sensitive email? /* * SHA implementation to validate password */ VaultController v = new VaultController(); int result = 0; try { result = v.loginCheck(username, password); } catch (NoSuchAlgorithmException e1) { e1.printStackTrace(); } if (result == 1) { failedattempt = 0; frmSignIn.dispose(); } else { txtWarning.setText("The Email and/or Password is incorrect. Please try again."); failedattempt++; } // TODO migrate failcheck to Vault controller! if (failedattempt > 1 && failedattempt < 5) { try { VaultController.Send( "sentineldatavault", "SENTINELDATA", username, "Security Warning", "Dear user,\n\nYou have multiple failed login attempts for your account.\n" + "If it is not you, please change your password immediately.\n\n" + "Sincerely,\nSentinel Data Vault Team"); } catch (AddressException e1) { e1.printStackTrace(); } catch (MessagingException e1) { e1.printStackTrace(); } } else if (failedattempt == 5) { DatabaseManager d = new DatabaseManager("vault_database"); User u = d.retrieveUserFromDatabase(username); d.deleteAllEntriesFromDatabase(u); d.deleteUserFromDatabase(u); try { JOptionPane.showMessageDialog( null, "Your account data has been deleted due to multiple failed login attempts"); VaultController.Send( "sentineldatavault", "SENTINELDATA", username, "Security Warning", "Dear user,\n\nWe have deleted your account.\n" + "Have a nice day.\n\n" + "Sincerely,\nSentinel Data Vault Team"); } catch (AddressException e1) { e1.printStackTrace(); } catch (MessagingException e1) { e1.printStackTrace(); } } } }); frmSignIn.getContentPane().setLayout(null); btnSignUp = new JButton("Create new account"); btnSignUp.setToolTipText("Click here to create a new Sentinel Data Vault account!"); btnSignUp.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { SignupView signup = new SignupView(); signup.setVisible(true); } }); btnSignUp.setBounds(57, 264, 158, 27); frmSignIn.getContentPane().add(btnSignUp); frmSignIn.getContentPane().add(btnNewButton); frmSignIn.getContentPane().add(lblPassword); frmSignIn.getContentPane().add(lblEmail); frmSignIn.getContentPane().add(textField); frmSignIn.getContentPane().add(passwordField); btnForgotPassword = new JButton("I forgot my password"); btnForgotPassword.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { frmSignIn.setVisible(false); PasswordRecoveryView p = new PasswordRecoveryView(frmSignIn); } }); btnForgotPassword.setToolTipText("Click here to reset your account password"); btnForgotPassword.setBounds(227, 264, 170, 27); frmSignIn.getContentPane().add(btnForgotPassword); lblSentinelDataVault = new JLabel("Sentinel Data Vault"); lblSentinelDataVault.setFont(new Font("Dialog", Font.PLAIN, 22)); lblSentinelDataVault.setBounds(119, 33, 206, 27); frmSignIn.getContentPane().add(lblSentinelDataVault); txtWarning = new JTextField(); txtWarning.setForeground(new Color(220, 20, 60)); txtWarning.setBorder(null); txtWarning.setOpaque(false); txtWarning.setFocusable(false); txtWarning.setEditable(false); txtWarning.setFont(new Font("Tahoma", Font.ITALIC, 12)); txtWarning.setBackground(SystemColor.window); txtWarning.setBounds(57, 196, 340, 26); frmSignIn.getContentPane().add(txtWarning); txtWarning.setColumns(10); frmSignIn .getContentPane() .setFocusTraversalPolicy( new FocusTraversalOnArray(new Component[] {textField, passwordField, btnNewButton})); frmSignIn.setFocusTraversalPolicy( new FocusTraversalOnArray(new Component[] {textField, passwordField, btnNewButton})); }
/** * Dem Konstruktor können Filter für den {@link PreselectionDialog Änderndialog} übergeben werden. * * @param listsFilter ein Objekt, welches die Listen des Änderndialogs filtert * @param filterTypes Typen der Objekte, die zur Auswahl angeboten werden sollen */ public DataIdentificationChoice( final PreselectionListsFilter listsFilter, final List filterTypes) { _gridBagLayout = new GridBagLayout(); setLayout(_gridBagLayout); setBorder(BorderFactory.createTitledBorder("Datenidentifikation")); // Tooltip vergeben // _simLabel.setToolTipText("Simulationsvariante"); wird nicht mehr benötigt // zuordnen der Label zu den Feldern _atgLabel.setLabelFor(_atgTextField); _aspLabel.setLabelFor(_aspTextField); _simLabel.setLabelFor(_simTextField); _objLabel.setLabelFor(_objList); // Felder sind nicht editierbar _atgTextField.setEditable(false); _atgTextField.setFocusable(false); _aspTextField.setEditable(false); _aspTextField.setFocusable(false); _simTextField.setEditable(false); _simTextField.setFocusable(false); _objList.setFocusable(false); // Ändern - Button implementieren _changeButton.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { if (_preselectionDialog == null) { if (_treeNodes == null || _connection == null) { _preselectionDialog = new PreselectionDialog( "Datenidentifikationsauswahl", _changeButton, listsFilter, filterTypes); } else { _preselectionDialog = new PreselectionDialog( "Datenidentifikationsauswahl", _changeButton, listsFilter, filterTypes, _treeNodes, _connection); _preselectionDialog.setSelectedPath(_treePath); } _preselectionDialog.setMaximumSelectedAttributeGroups(1); _preselectionDialog.setMinimumSelectedAttributeGroups(1); if (_simulationVariant != -1) { _preselectionDialog.showSimulationVariant(); _preselectionDialog.setSimulationVariant(_simulationVariant); } _preselectionDialog.setMaximumSelectedAspects(_numberOfSelectedAspects); _preselectionDialog.setMinimumSelectedAspects(_numberOfSelectedAspects); _preselectionDialog.setMinimumSelectedAttributeGroups( _numberOfSelectedAttributeGroups); _preselectionDialog.setMaximumSelectedObjects(_maximumSelectedObjects); _preselectionDialog.setMinimumSelectedObjects(_minimumSelectedObjects); } _preselectionDialog.setSelectedObjectTypes(_objectTypes); _preselectionDialog.setSelectedAttributeGroups(_attributeGroups); _preselectionDialog.setSelectedAspects(_aspects); _preselectionDialog.setSelectedObjects(_objects); if (_preselectionDialog.show()) { // OK-Button wurde gedrückt // Werte übernehmen setObjectTypes(_preselectionDialog.getSelectedObjectTypes()); setAttributeGroups(_preselectionDialog.getSelectedAttributeGroups()); setAspects(_preselectionDialog.getSelectedAspects()); setObjects(_preselectionDialog.getSelectedObjects()); setSimulationVariant(_preselectionDialog.getSimulationVariant()); _treePath = _preselectionDialog.getSelectedTreePath(); } } }); createAndShowGui(); }
@Override public void actionPerformed(ActionEvent ae) { ViajesEnt ViajesE = new ViajesEnt(); ViajesNg ViajesN = new ViajesNg(); if (ae.getSource() == jbtnListar) { LimpiarCampos(); pnDatos.setVisible(true); jpBotones.setVisible(false); jpError.setVisible(false); vaciar(); llenarDatos(); } if (ae.getSource() == jbtnBuscar) { LimpiarCampos(); String Codigo; Codigo = jtxtCodigo.getText(); if (Codigo.trim().length() != 0) { ViajesE = ViajesN.buscarViajeCodigo(Codigo); if (ViajesE != null) { jtxtCodigo.setText(ViajesE.getCodigo()); jcbDestino.setSelectedItem(ViajesE.getDestino()); jcbOrigen.setSelectedItem(ViajesE.getOrigen()); jtxtPrecio.setText(ViajesE.getPrecio()); jcbEstado.setSelectedItem(ViajesE.getEstado()); jtxtCodigo.setFocusable(false); jbtnBuscar.setVisible(false); jbtnActualizar.setVisible(true); if (jbtnActualizar.getBounds().x == 0) { jbtnListar.setBounds(0, 0, 350, 60); jbtnLimpiar.setBounds(350, 0, 350, 60); } } else { Toolkit.getDefaultToolkit().beep(); jpError.setBackground(new Color(237, 28, 36)); jlbValidar.setText("El viaje no se ha encontrado"); } } else { Toolkit.getDefaultToolkit().beep(); jpError.setBackground(new Color(237, 28, 36)); jlbValidar.setText("Ingrese el Código"); jtxtCodigo.setBorder(BorderFactory.createLineBorder(Color.RED, 1)); } } if (ae.getSource() == jbtnActualizar) { if (jtxtPrecio.getText().trim().length() == 0) { Toolkit.getDefaultToolkit().beep(); jpError.setBackground(new Color(237, 28, 36)); jlbValidar.setText("Ingrese los campos en rojo"); jtxtPrecio.setBorder(BorderFactory.createLineBorder(Color.RED, 1)); return; } else { jtxtPrecio.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1)); } try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); } catch (Exception ex) { System.err.println(ex); } int option = JOptionPane.showConfirmDialog( this, "¿Está seguro que desea actualizar el viaje?", "Airline Travel", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); try { UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); } catch (Exception ex) { ex.printStackTrace(); } if (option == JOptionPane.YES_OPTION) { if (jtxtCodigo.getText().trim().length() > 0) { ViajesE.setCodigo(jtxtCodigo.getText()); } ViajesE.setOrigen((String) jcbOrigen.getSelectedItem()); ViajesE.setDestino((String) jcbDestino.getSelectedItem()); if (jtxtPrecio.getText().trim().length() > 0) { ViajesE.setPrecio(jtxtPrecio.getText()); } ViajesE.setEstado((String) jcbEstado.getSelectedItem()); boolean respuestau = ViajesN.modificarViaje(ViajesE); if (respuestau) { LimpiarCampos(); jpError.setBackground(new Color(0, 154, 225)); jlbValidar.setText("Se ha actualizado el viaje"); } } } if (ae.getSource() == jbtnLimpiar) { LimpiarCampos(); VaciarCampos(); jtxtCodigo.setFocusable(true); jbtnBuscar.setVisible(true); jbtnActualizar.setVisible(false); if (jbtnActualizar.getBounds().x == 0) { jbtnListar.setBounds(0, 0, 233, 60); jbtnLimpiar.setBounds(467, 0, 233, 60); } } }
/** the JbInit method */ public void jbInit() throws Exception { // Layout definition for this panel dataPanel.setLayout(panelLayout); dataPanel.setMinimumSize(new Dimension(100, 100)); this.setLayout(borderLayout); this.setSize(new Dimension(862, 514)); this.setPreferredSize(new Dimension(479, 306)); this.setMinimumSize(new Dimension(479, 306)); this.setMaximumSize(new Dimension(479, 306)); mIdtraslo.setDocument((Document) panelBinding.bindUIControl("Idtraslo", mIdtraslo)); mIdtraslo.setEditable(false); mDescrip.setFocusable(false); mDescrip.setEditable(false); mEstadotraslotxt.setFocusable(false); mEstadopasillotxt.setFocusable(false); mEstadoprocesotraslotxt.setFocusable(false); mDescripvisualEntrada.setFocusable(false); mDescripvisualSalida.setFocusable(false); mPasilloactual.setFocusable(false); mPasillodestino.setFocusable(true); mPosplc.setFocusable(false); jCheckBoxTrasbordoEntrada.setText("Trasbord Entradas"); jCheckBoxTrasbordoEntrada.setToolTipText( "Realitzar trasbord per ubicar containers en entrada de passadis"); dataPanel.add( labelIdtraslo, new GridBagConstraints( 0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mIdtraslo, new GridBagConstraints( 1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); labelIdtraslo.setLabelFor(mIdtraslo); mIdtraslo.setColumns(5); labelIdtraslo.setText(panelBinding.findCtrlValueBinding("Idtraslo").getLabel()); mIdtraslo.setToolTipText(panelBinding.findCtrlValueBinding("Idtraslo").getTooltip()); mDescrip.setDocument((Document) panelBinding.bindUIControl("Descrip", mDescrip)); dataPanel.add( labelDescrip, new GridBagConstraints( 0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mDescrip, new GridBagConstraints( 1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); labelDescrip.setLabelFor(mDescrip); mDescrip.setColumns(15); labelDescrip.setText(panelBinding.findCtrlValueBinding("Descrip").getLabel()); mDescrip.setToolTipText(panelBinding.findCtrlValueBinding("Descrip").getTooltip()); mEstadotraslotxt.setDocument( (Document) panelBinding.bindUIControl("Estadotraslotxt", mEstadotraslotxt)); dataPanel.add( labelEstadotraslotxt, new GridBagConstraints( 0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mEstadotraslotxt, new GridBagConstraints( 1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); labelEstadotraslotxt.setLabelFor(mEstadotraslotxt); mEstadotraslotxt.setColumns(20); labelEstadotraslotxt.setText(panelBinding.findCtrlValueBinding("Estadotraslotxt").getLabel()); mEstadotraslotxt.setToolTipText( panelBinding.findCtrlValueBinding("Estadotraslotxt").getTooltip()); mEstadopasillotxt.setDocument( (Document) panelBinding.bindUIControl("Estadopasillotxt", mEstadopasillotxt)); dataPanel.add( labelEstadopasillotxt, new GridBagConstraints( 0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mEstadopasillotxt, new GridBagConstraints( 1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); labelEstadopasillotxt.setLabelFor(mEstadopasillotxt); mEstadopasillotxt.setColumns(20); labelEstadopasillotxt.setText(panelBinding.findCtrlValueBinding("Estadopasillotxt").getLabel()); mEstadopasillotxt.setToolTipText( panelBinding.findCtrlValueBinding("Estadopasillotxt").getTooltip()); mEstadoprocesotraslotxt.setDocument( (Document) panelBinding.bindUIControl("Estadoprocesotraslotxt", mEstadoprocesotraslotxt)); dataPanel.add( labelEstadoprocesotraslotxt, new GridBagConstraints( 0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mEstadoprocesotraslotxt, new GridBagConstraints( 1, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); labelEstadoprocesotraslotxt.setLabelFor(mEstadoprocesotraslotxt); mEstadoprocesotraslotxt.setColumns(20); labelEstadoprocesotraslotxt.setText( panelBinding.findCtrlValueBinding("Estadoprocesotraslotxt").getLabel()); mEstadoprocesotraslotxt.setToolTipText( panelBinding.findCtrlValueBinding("Estadoprocesotraslotxt").getTooltip()); mDescripvisualEntrada.setDocument( (Document) panelBinding.bindUIControl("DescripvisualEntrada", mDescripvisualEntrada)); dataPanel.add( labelDescripvisualEntrada, new GridBagConstraints( 0, 5, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mDescripvisualEntrada, new GridBagConstraints( 1, 5, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); labelDescripvisualEntrada.setLabelFor(mDescripvisualEntrada); mDescripvisualEntrada.setColumns(20); labelDescripvisualEntrada.setText( panelBinding.findCtrlValueBinding("DescripvisualEntrada").getLabel()); mDescripvisualEntrada.setToolTipText( panelBinding.findCtrlValueBinding("DescripvisualEntrada").getTooltip()); mDescripvisualSalida.setDocument( (Document) panelBinding.bindUIControl("DescripvisualSalida", mDescripvisualSalida)); dataPanel.add( labelDescripvisualSalida, new GridBagConstraints( 0, 6, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mDescripvisualSalida, new GridBagConstraints( 1, 6, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); labelDescripvisualSalida.setLabelFor(mDescripvisualSalida); mDescripvisualSalida.setColumns(20); labelDescripvisualSalida.setText( panelBinding.findCtrlValueBinding("DescripvisualSalida").getLabel()); mDescripvisualSalida.setToolTipText( panelBinding.findCtrlValueBinding("DescripvisualSalida").getTooltip()); mPasilloactual.setDocument( (Document) panelBinding.bindUIControl("Pasilloactual", mPasilloactual)); dataPanel.add( labelPasilloactual, new GridBagConstraints( 0, 7, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mPasilloactual, new GridBagConstraints( 1, 7, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); labelPasilloactual.setLabelFor(mPasilloactual); mPasilloactual.setColumns(3); labelPasilloactual.setText(panelBinding.findCtrlValueBinding("Pasilloactual").getLabel()); mPasilloactual.setToolTipText(panelBinding.findCtrlValueBinding("Pasilloactual").getTooltip()); mPasillodestino.setDocument( (Document) panelBinding.bindUIControl("Pasillodestino", mPasillodestino)); dataPanel.add( labelPasillodestino, new GridBagConstraints( 0, 8, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mPasillodestino, new GridBagConstraints( 1, 8, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); labelPasillodestino.setLabelFor(mPasillodestino); mPasillodestino.setColumns(3); labelPasillodestino.setText(panelBinding.findCtrlValueBinding("Pasillodestino").getLabel()); mPasillodestino.setToolTipText( panelBinding.findCtrlValueBinding("Pasillodestino").getTooltip()); mPosplc.setDocument((Document) panelBinding.bindUIControl("Posplc", mPosplc)); dataPanel.add( labelPosplc, new GridBagConstraints( 0, 9, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mPosplc, new GridBagConstraints( 1, 9, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); // dataPanel.add(buttonArrancar, new GridBagConstraints(0, 10, 3, 2, 0.0, 0.0, // GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 0, 22, 63), -98, -13)); dataPanel.add( buttonArrancar, new GridBagConstraints( 0, 10, 3, 2, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 5, 5), 0, 0)); // dataPanel.add(jCheckBoxTrasbordoEntrada, new GridBagConstraints(2, 8, 1, 1, 0.0, 0.0, // GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); labelPosplc.setLabelFor(mPosplc); mPosplc.setColumns(5); labelPosplc.setText(panelBinding.findCtrlValueBinding("Posplc").getLabel()); // Layout the datapanel and the navigation bar mPosplc.setToolTipText(panelBinding.findCtrlValueBinding("Posplc").getTooltip()); add(dataPanel, BorderLayout.CENTER); navBar.setModel( JUNavigationBar.createViewBinding( panelBinding, navBar, "SgavtrasloEntSalView1", null, "SgavtrasloEntSal1Iter")); statusBar.setModel(JUStatusBar.createPanelBinding(panelBinding, statusBar)); add(navBar, BorderLayout.NORTH); add(statusBar, BorderLayout.SOUTH); // Quitar botones de add / remove navBar.remove(navBar.getButton(JUNavigationBar.BUTTON_DELETE)); navBar.remove(navBar.getButton(JUNavigationBar.BUTTON_INSERT)); jCheckBoxTrasbordoEntrada.setModel( (ButtonModel) panelBinding.bindUIControl("Trasbordoentrada", jCheckBoxTrasbordoEntrada)); if (getIdTraslo() == 0) jCheckBoxTrasbordoEntrada.setEnabled(false); }