/** Shows the full image in the main area and sets the application title. */ @Override public void actionPerformed(ActionEvent e) { if (stopButton.isEnabled() == true) { javax.swing.JOptionPane.showMessageDialog( null, "Please stop the camera before you choose to load image", "Action not allowed", javax.swing.JOptionPane.INFORMATION_MESSAGE); } else { clearpanel(); photographLabel = new JLabel(); javax.swing.GroupLayout inputPanelLayout = new javax.swing.GroupLayout(inputPanel); inputPanel.setLayout(inputPanelLayout); inputPanelLayout.setHorizontalGroup( inputPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( inputPanelLayout.createSequentialGroup().addComponent(photographLabel))); inputPanelLayout.setVerticalGroup( inputPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( inputPanelLayout.createSequentialGroup().addComponent(photographLabel))); photographLabel.setIcon(displayPhoto); // setTitle("Icon Demo: " + getValue(SHORT_DESCRIPTION).toString()); imageload = getValue(SHORT_DESCRIPTION).toString(); // javax.swing.JOptionPane.showMessageDialog(null, "The image to be processed is // "+imageload, "Image", javax.swing.JOptionPane.INFORMATION_MESSAGE); } }
private void initComponents() { panelStatus = new JImagePanel(); labDesc = new JLabel(); setName("Form"); // NOI18N panelStatus.setName("panelStatus"); // NOI18N panelStatus.setPreferredSize(new java.awt.Dimension(28, 28)); javax.swing.GroupLayout panelStatusLayout = new javax.swing.GroupLayout(panelStatus); panelStatus.setLayout(panelStatusLayout); panelStatusLayout.setHorizontalGroup( panelStatusLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 28, Short.MAX_VALUE)); panelStatusLayout.setVerticalGroup( panelStatusLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 28, Short.MAX_VALUE)); labDesc.setFont(new java.awt.Font("Verdana", Font.ITALIC, 12)); // NOI18N labDesc.setText(""); // NOI18N labDesc.setName("labDesc"); // NOI18N javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addComponent( panelStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent( labDesc, javax.swing.GroupLayout.PREFERRED_SIZE, 311, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( panelStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(labDesc, javax.swing.GroupLayout.DEFAULT_SIZE, 28, Short.MAX_VALUE)); toAdjust = new LinkedList<Component>(); toAdjust.add(this); toAdjust.add(labDesc); toAdjust.add(panelStatus); }
/** * Creates the terminal for interaction with client from server * * @param s */ public Terminal(Server s) { mServer = s; TextFieldListener tfListener = new TextFieldListener(); input.addActionListener(tfListener); Display = new javax.swing.JLayeredPane(); input.setColumns(50); output.setColumns(50); output.setRows(30); output.setEditable(false); output.setBackground(Color.BLACK); output.setForeground(Color.WHITE); input.requestFocus(); // start with focus on this field output.setBounds(0, 0, 550, 310); Display.add(output, javax.swing.JLayeredPane.DEFAULT_LAYER); input.setBounds(0, 320, 550, 25); Display.add(input, javax.swing.JLayeredPane.DEFAULT_LAYER); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addComponent( Display, javax.swing.GroupLayout.PREFERRED_SIZE, 550, javax.swing.GroupLayout.PREFERRED_SIZE))); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent( Display, javax.swing.GroupLayout.PREFERRED_SIZE, 350, javax.swing.GroupLayout.PREFERRED_SIZE)))); pack(); }
private void initComponents() { javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 400, Short.MAX_VALUE)); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 300, Short.MAX_VALUE)); }
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 78, Short.MAX_VALUE)); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 15, Short.MAX_VALUE)); } // </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 400, Short.MAX_VALUE)); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 300, Short.MAX_VALUE)); pack(); } // </editor-fold>//GEN-END:initComponents
private void startButtonActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_startButtonActionPerformed // TODO add your handling code here: imageload = ""; startButton.setEnabled(false); stopButton.setEnabled(true); clearpanel(); new NativeDiscovery().discover(); pp = new PicsPanel(this); javax.swing.GroupLayout inputPanelLayout = new javax.swing.GroupLayout(inputPanel); inputPanel.setLayout(inputPanelLayout); inputPanelLayout.setHorizontalGroup( inputPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(inputPanelLayout.createSequentialGroup().addComponent(pp))); inputPanelLayout.setVerticalGroup( inputPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(inputPanelLayout.createSequentialGroup().addComponent(pp))); } // GEN-LAST:event_startButtonActionPerformed
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel2 = new javax.swing.JPanel(); usernameTextBox = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); passwordTextBox = new javax.swing.JPasswordField(); buttonLogin = new javax.swing.JButton(); buttonCancel = new javax.swing.JButton(); backButton = new javax.swing.JButton(); loginBannerLabel = new javax.swing.JLabel(); loginIconLabel = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("SCHOOL MANAGEMENT SYSTEM"); setAlwaysOnTop(true); setModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL); setResizable(false); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("")); usernameTextBox.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { usernameTextBoxActionPerformed(evt); } }); usernameTextBox.addKeyListener( new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { usernameTextBoxKeyPressed(evt); } }); jLabel1.setText("Username"); jLabel2.setText("Password"); passwordTextBox.addKeyListener( new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { passwordTextBoxKeyPressed(evt); } }); buttonLogin.setText("Login"); buttonLogin.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { buttonLoginActionPerformed(evt); } }); buttonCancel.setText("Cancel"); buttonCancel.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { buttonCancelActionPerformed(evt); } }); backButton.setText("<< Back"); backButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { backButtonActionPerformed(evt); } }); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel2Layout .createSequentialGroup() .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel2Layout .createSequentialGroup() .addComponent( buttonLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(8, 8, 8)) .addGroup( jPanel2Layout .createSequentialGroup() .addContainerGap() .addComponent(jLabel2)) .addGroup( jPanel2Layout .createSequentialGroup() .addContainerGap() .addComponent(jLabel1))) .addGap(8, 8, 8) .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( passwordTextBox, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE) .addComponent( usernameTextBox, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE) .addGroup( jPanel2Layout .createSequentialGroup() .addGap(10, 10, 10) .addComponent( buttonCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent( backButton, javax.swing.GroupLayout.DEFAULT_SIZE, 93, Short.MAX_VALUE))) .addContainerGap())); jPanel2Layout.setVerticalGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel2Layout .createSequentialGroup() .addContainerGap() .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( usernameTextBox, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1)) .addGap(18, 18, 18) .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( passwordTextBox, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2)) .addGap(18, 18, 18) .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(buttonLogin) .addComponent(backButton) .addComponent(buttonCancel)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); loginBannerLabel.setIcon( new javax.swing.ImageIcon(getClass().getResource("/images/login.png"))); // NOI18N loginIconLabel.setIcon( new javax.swing.ImageIcon(getClass().getResource("/images/adminControl2.png"))); // NOI18N javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent( loginBannerLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(loginIconLabel) .addContainerGap(14, Short.MAX_VALUE)) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent( jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap( javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent( loginIconLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( loginBannerLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(182, Short.MAX_VALUE)) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGap(86, 86, 86) .addComponent( jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(20, Short.MAX_VALUE)))); pack(); } // </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { msgLabel = new javax.swing.JLabel(); progressBar = new javax.swing.JProgressBar(); cancelBtn = new javax.swing.JButton(); infoLabel = new javax.swing.JLabel(); tipsLabel = new JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); setLocationByPlatform(true); msgLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); msgLabel.setText("Working..."); cancelBtn.setText("Cancel"); cancelBtn.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelBtnActionPerformed(evt); } }); infoLabel.setText("info"); tipsLabel.setText(""); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( progressBar, javax.swing.GroupLayout.DEFAULT_SIZE, 551, Short.MAX_VALUE) .addComponent( msgLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 551, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( infoLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 551, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( tipsLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 551, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cancelBtn, javax.swing.GroupLayout.Alignment.TRAILING)) .addContainerGap())); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent(msgLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent( progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(infoLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( tipsLabel, GroupLayout.PREFERRED_SIZE, 60, GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(cancelBtn) .addContainerGap())); pack(); } // </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { Object_Group = new javax.swing.ButtonGroup(); Relationship_Group = new javax.swing.ButtonGroup(); Object_Label = new javax.swing.JLabel(); ballButton = new javax.swing.JRadioButton(); boxButton = new javax.swing.JRadioButton(); Weight_Label = new javax.swing.JLabel(); Radius_Label = new javax.swing.JLabel(); Width_Label = new javax.swing.JLabel(); Relationship = new javax.swing.JLabel(); insideRButton = new javax.swing.JRadioButton(); insideUButton = new javax.swing.JRadioButton(); topButton = new javax.swing.JRadioButton(); behindButton = new javax.swing.JRadioButton(); addButton = new javax.swing.JButton(); clearButton = new javax.swing.JButton(); cancelButton = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); weightValue = new javax.swing.JSlider(); radiusValue = new javax.swing.JSlider(); widthValue = new javax.swing.JSlider(); weightLabelValue = new javax.swing.JLabel(); radiusLabelValue = new javax.swing.JLabel(); widthLabelValue = new javax.swing.JLabel(); inFrontButton = new javax.swing.JRadioButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); Object_Label.setText("Object"); Object_Group.add(ballButton); ballButton.setText("Ball"); ballButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ballButtonActionPerformed(evt); } }); Object_Group.add(boxButton); boxButton.setText("Box"); boxButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { boxButtonActionPerformed(evt); } }); Weight_Label.setText("Weight"); Radius_Label.setText("Radius"); Width_Label.setText("Width"); Relationship.setText("Relationship to Bus"); Relationship_Group.add(insideRButton); insideRButton.setText("Inside (with a seatbelt)"); insideRButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { insideRButtonActionPerformed(evt); } }); Relationship_Group.add(insideUButton); insideUButton.setText("Inside (without a seatbelt)"); Relationship_Group.add(topButton); topButton.setText("On Top"); Relationship_Group.add(behindButton); behindButton.setText("Behind (Dragged)"); addButton.setText("Add"); addButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addButtonActionPerformed(evt); } }); clearButton.setText("Clear"); clearButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { clearButtonActionPerformed(evt); } }); cancelButton.setText("Cancel"); cancelButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelButtonActionPerformed(evt); } }); jLabel2.setText("Object Attributes"); weightValue.setMaximum(4); weightValue.setMinimum(1); weightValue.setSnapToTicks(true); weightValue.setValue(2); weightValue.addChangeListener( new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { weightValueStateChanged(evt); } }); radiusValue.setMaximum(4); radiusValue.setMinimum(1); radiusValue.setSnapToTicks(true); radiusValue.setValue(2); radiusValue.addChangeListener( new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { radiusValueStateChanged(evt); } }); widthValue.setMaximum(4); widthValue.setMinimum(1); widthValue.setSnapToTicks(true); widthValue.setValue(2); widthValue.addChangeListener( new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { widthValueStateChanged(evt); } }); weightLabelValue.setText("medium"); radiusLabelValue.setText("medium"); widthLabelValue.setText("medium"); Relationship_Group.add(inFrontButton); inFrontButton.setText("In Front of"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addComponent(Object_Label) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .RELATED)) .addGroup( layout .createSequentialGroup() .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment .LEADING) .addComponent(ballButton) .addComponent(boxButton)) .addGap(36, 36, 36) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment .LEADING) .addGroup( layout .createSequentialGroup() .addGroup( layout .createParallelGroup( javax.swing .GroupLayout .Alignment .TRAILING) .addComponent( Weight_Label) .addComponent( Radius_Label) .addComponent( Width_Label)) .addPreferredGap( javax.swing.LayoutStyle .ComponentPlacement .RELATED) .addGroup( layout .createParallelGroup( javax.swing .GroupLayout .Alignment .LEADING) .addComponent( widthValue, 0, 0, Short.MAX_VALUE) .addGroup( layout .createParallelGroup( javax.swing .GroupLayout .Alignment .LEADING, false) .addComponent( radiusValue, 0, 0, Short .MAX_VALUE) .addComponent( weightValue, javax.swing .GroupLayout .PREFERRED_SIZE, 142, javax.swing .GroupLayout .PREFERRED_SIZE))) .addPreferredGap( javax.swing.LayoutStyle .ComponentPlacement .RELATED) .addGroup( layout .createParallelGroup( javax.swing .GroupLayout .Alignment .LEADING) .addComponent( widthLabelValue) .addComponent( weightLabelValue) .addComponent( radiusLabelValue)) .addPreferredGap( javax.swing.LayoutStyle .ComponentPlacement .RELATED)) .addComponent(jLabel2)))) .addGap(62, 62, 62) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(Relationship) .addGroup( layout .createSequentialGroup() .addGap(10, 10, 10) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment .LEADING) .addComponent(behindButton) .addComponent(inFrontButton) .addComponent(insideUButton) .addComponent(insideRButton) .addComponent(topButton)))) .addGap(90, 90, 90)) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addComponent(addButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(clearButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(cancelButton) .addGap(193, 193, 193))))); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Relationship) .addComponent(Object_Label) .addComponent(jLabel2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addComponent(topButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(insideRButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(insideUButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(behindButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(inFrontButton)) .addGroup( layout .createSequentialGroup() .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGap(6, 6, 6) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment .LEADING) .addComponent(Weight_Label) .addComponent( weightValue, javax.swing.GroupLayout .PREFERRED_SIZE, javax.swing.GroupLayout .DEFAULT_SIZE, javax.swing.GroupLayout .PREFERRED_SIZE)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .RELATED) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment .LEADING) .addComponent(Radius_Label) .addComponent( radiusValue, javax.swing.GroupLayout .PREFERRED_SIZE, javax.swing.GroupLayout .DEFAULT_SIZE, javax.swing.GroupLayout .PREFERRED_SIZE))) .addGroup( layout .createSequentialGroup() .addComponent(weightLabelValue) .addGap(18, 18, 18) .addComponent(radiusLabelValue))) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(Width_Label) .addComponent(widthLabelValue) .addComponent( widthValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup( layout .createSequentialGroup() .addComponent(ballButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(boxButton))) .addGap(18, 18, 18) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(addButton) .addComponent(clearButton) .addComponent(cancelButton)) .addGap(21, 21, 21))); pack(); } // </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel2 = new javax.swing.JLabel(); lblTitulo = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); descripcion = new javax.swing.JTextField(); jLabel4 = new javax.swing.JLabel(); folio = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); tablaPrincipal = new javax.swing.JTable(); btnNuevo = new javax.swing.JButton(); btnImprimir = new javax.swing.JButton(); jPanel1 = new javax.swing.JPanel(); btnCerrar = new javax.swing.JButton(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); almacen = new javax.swing.JTextField(); tipoMovimiento = new javax.swing.JComboBox(); txtSumaTotal = new javax.swing.JTextField(); jLabel8 = new javax.swing.JLabel(); btnEliminarRenglon = new javax.swing.JButton(); fecha = new org.jdesktop.swingx.JXDatePicker(); jLabel3 = new javax.swing.JLabel(); jLabel2.setText("jLabel2"); setTitle("Movimiento de almacén"); getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); lblTitulo.setFont(new java.awt.Font("Arial", 1, 36)); lblTitulo.setForeground(new java.awt.Color(255, 255, 255)); lblTitulo.setText("Movimiento de almacén"); getContentPane() .add(lblTitulo, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, -1, 40)); jLabel1.setFont(new java.awt.Font("Tahoma", 1, 12)); jLabel1.setForeground(new java.awt.Color(255, 255, 255)); jLabel1.setText("Descripción:"); getContentPane() .add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 90, -1, 30)); getContentPane() .add(descripcion, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 90, 600, -1)); jLabel4.setFont(new java.awt.Font("Tahoma", 1, 12)); jLabel4.setForeground(new java.awt.Color(255, 255, 255)); jLabel4.setText("Folio:"); getContentPane() .add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(700, 90, -1, 30)); getContentPane().add(folio, new org.netbeans.lib.awtextra.AbsoluteConstraints(740, 90, 80, -1)); tablaPrincipal.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N tablaPrincipal.setModel( new javax.swing.table.DefaultTableModel( new Object[][] {}, new String[] {"Código artículo", "Descripción", "Costo", "Cantidad", "Total"}) { boolean[] canEdit = new boolean[] {true, false, true, true, false}; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); tablaPrincipal.setToolTipText("[ F1 ] catalogo de articulos"); tablaPrincipal.setCellSelectionEnabled(true); tablaPrincipal.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); tablaPrincipal.setGridColor(new java.awt.Color(51, 255, 255)); tablaPrincipal.setRowHeight(25); tablaPrincipal.setShowHorizontalLines(false); tablaPrincipal.setSurrendersFocusOnKeystroke(true); jScrollPane1.setViewportView(tablaPrincipal); getContentPane() .add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 120, 820, 280)); btnNuevo.setIcon( new javax.swing.ImageIcon(getClass().getResource("/64x64/page_add.png"))); // NOI18N btnNuevo.setText("<html><center>Agregar éste movimiento [F5]</center></html>"); btnNuevo.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnNuevoActionPerformed(evt); } }); getContentPane() .add(btnNuevo, new org.netbeans.lib.awtextra.AbsoluteConstraints(470, 440, 190, 60)); btnImprimir.setIcon( new javax.swing.ImageIcon(getClass().getResource("/64x64/printer.png"))); // NOI18N btnImprimir.setText("<html><center>Imprimir [F8]</center></html>"); btnImprimir.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnImprimirActionPerformed(evt); } }); getContentPane() .add(btnImprimir, new org.netbeans.lib.awtextra.AbsoluteConstraints(670, 440, 160, 60)); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 30, Short.MAX_VALUE)); jPanel1Layout.setVerticalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 30, Short.MAX_VALUE)); getContentPane() .add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(810, 480, 30, 30)); btnCerrar.setIcon( new javax.swing.ImageIcon(getClass().getResource("/64x64/back.png"))); // NOI18N btnCerrar.setText("<HTML>Regresar a almacén [Esc]</HTML>"); btnCerrar.setRequestFocusEnabled(false); btnCerrar.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCerrarActionPerformed(evt); } }); getContentPane() .add(btnCerrar, new org.netbeans.lib.awtextra.AbsoluteConstraints(600, 10, 230, 40)); jLabel5.setFont(new java.awt.Font("Tahoma", 1, 12)); jLabel5.setForeground(new java.awt.Color(255, 255, 255)); jLabel5.setText("Tipo de movimiento:"); getContentPane() .add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 60, 130, 30)); jLabel6.setFont(new java.awt.Font("Tahoma", 1, 12)); jLabel6.setForeground(new java.awt.Color(255, 255, 255)); jLabel6.setText("Fecha:"); getContentPane() .add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(630, 60, 40, 30)); jLabel7.setFont(new java.awt.Font("Tahoma", 1, 12)); jLabel7.setForeground(new java.awt.Color(255, 255, 255)); jLabel7.setText("Almacén [F1]:"); getContentPane() .add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(340, 50, 90, 30)); almacen.setEditable(false); getContentPane() .add(almacen, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 60, 190, -1)); tipoMovimiento.setModel( new javax.swing.DefaultComboBoxModel( new String[] {"Entrada al almacén", "Salida del almacén", "Ajuste"})); getContentPane() .add(tipoMovimiento, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 60, 140, -1)); getContentPane() .add(txtSumaTotal, new org.netbeans.lib.awtextra.AbsoluteConstraints(660, 410, 170, -1)); jLabel8.setFont(new java.awt.Font("Tahoma", 1, 12)); jLabel8.setForeground(new java.awt.Color(255, 255, 255)); jLabel8.setText("Total:"); getContentPane() .add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 410, -1, 20)); btnEliminarRenglon.setIcon( new javax.swing.ImageIcon(getClass().getResource("/16x16/remove.png"))); // NOI18N btnEliminarRenglon.setText("Eliminar renglón seleccionado [F12]"); btnEliminarRenglon.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnEliminarRenglonActionPerformed(evt); } }); getContentPane() .add( btnEliminarRenglon, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 410, -1, -1)); fecha.setFormats(java.text.DateFormat.getDateInstance(java.text.DateFormat.MEDIUM)); getContentPane() .add(fecha, new org.netbeans.lib.awtextra.AbsoluteConstraints(670, 60, 160, -1)); jLabel3.setFont(new java.awt.Font("Tahoma", 3, 12)); // NOI18N jLabel3.setText("[ F1 ] catalogo de articulos"); getContentPane() .add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 410, 190, 20)); pack(); } // </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanel1.setBackground(new java.awt.Color(153, 255, 51)); jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel1.setForeground(new java.awt.Color(255, 0, 51)); jLabel1.setText("SUCCESSFULLY REMOVED"); jButton1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jButton1.setText("OK"); jButton1.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addContainerGap(152, Short.MAX_VALUE) .addComponent(jLabel1) .addGap(145, 145, 145)) .addGroup( jPanel1Layout .createSequentialGroup() .addGap(217, 217, 217) .addComponent(jButton1) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel1Layout.setVerticalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addGap(72, 72, 72) .addComponent(jLabel1) .addGap(26, 26, 26) .addComponent(jButton1) .addContainerGap(51, Short.MAX_VALUE))); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); pack(); } // </editor-fold>
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); orderPanel = new javax.swing.JPanel(); filler2 = new javax.swing.Box.Filler( new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0)); orderLabel = new javax.swing.JLabel(); filler3 = new javax.swing.Box.Filler( new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); filler1 = new javax.swing.Box.Filler( new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0)); datePanel = new javax.swing.JPanel(); dateLabel = new javax.swing.JLabel(); detailButton = new javax.swing.JButton(); jPanel1.setName("jPanel1"); // NOI18N org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(imat.IMatApp.class) .getContext() .getResourceMap(OrderPanel.class); jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N jButton1.setName("jButton1"); // NOI18N setBackground(resourceMap.getColor("Form.background")); // NOI18N setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); setMaximumSize(new java.awt.Dimension(32767, 55)); setMinimumSize(new java.awt.Dimension(0, 55)); setName("Form"); // NOI18N orderPanel.setBackground(resourceMap.getColor("orderPanel.background")); // NOI18N orderPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); orderPanel.setMinimumSize(new java.awt.Dimension(0, 30)); orderPanel.setName("orderPanel"); // NOI18N orderPanel.setLayout(new javax.swing.BoxLayout(orderPanel, javax.swing.BoxLayout.LINE_AXIS)); filler2.setName("filler2"); // NOI18N orderPanel.add(filler2); orderLabel.setFont(resourceMap.getFont("orderLabel.font")); // NOI18N orderLabel.setText(resourceMap.getString("orderLabel.text")); // NOI18N orderLabel.setName("orderLabel"); // NOI18N orderPanel.add(orderLabel); filler3.setName("filler3"); // NOI18N orderPanel.add(filler3); filler1.setName("filler1"); // NOI18N orderPanel.add(filler1); datePanel.setBackground(resourceMap.getColor("datePanel.background")); // NOI18N datePanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); datePanel.setName("datePanel"); // NOI18N dateLabel.setBackground(resourceMap.getColor("dateLabel.background")); // NOI18N dateLabel.setFont(resourceMap.getFont("dateLabel.font")); // NOI18N dateLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); dateLabel.setText(resourceMap.getString("dateLabel.text")); // NOI18N dateLabel.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); dateLabel.setName("dateLabel"); // NOI18N detailButton.setText(resourceMap.getString("detailButton.text")); // NOI18N detailButton.setName("detailButton"); // NOI18N javax.swing.GroupLayout datePanelLayout = new javax.swing.GroupLayout(datePanel); datePanel.setLayout(datePanelLayout); datePanelLayout.setHorizontalGroup( datePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, datePanelLayout .createSequentialGroup() .addComponent( dateLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 72, Short.MAX_VALUE) .addComponent(detailButton) .addContainerGap())); datePanelLayout.setVerticalGroup( datePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( datePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( dateLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE) .addComponent(detailButton))); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addComponent( orderPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( datePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( orderPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE) .addComponent( datePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); } // </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); txtCod = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); txtNom = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); txtPrecio = new javax.swing.JTextField(); txtKg = new javax.swing.JTextField(); btnGuardar = new javax.swing.JButton(); btnBorrarArt = new javax.swing.JButton(); jLabel13 = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); btnActualizarArt = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Mantenimiento de Artículos"); jLabel1.setText("Codigo:"); jLabel2.setText("Nombre:"); jLabel3.setText("Precio:"); jLabel4.setText("Kgs:"); btnGuardar.setText("Guardar"); btnGuardar.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnGuardarActionPerformed(evt); } }); btnBorrarArt.setText("Borrar Artículo"); btnBorrarArt.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnBorrarArtActionPerformed(evt); } }); jLabel13.setIcon( new javax.swing.ImageIcon(getClass().getResource("/GUI/logo_acodike.gif"))); // NOI18N jLabel13.setText("jLabel13"); jTable1.setModel( new javax.swing.table.DefaultTableModel( new Object[][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String[] {"Title 1", "Title 2", "Title 3", "Title 4"})); jTable1.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jTable1MouseClicked(evt); } }); jScrollPane2.setViewportView(jTable1); btnActualizarArt.setText("Actualizar"); btnActualizarArt.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnActualizarArtActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup( layout .createSequentialGroup() .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel4) .addComponent(jLabel3) .addComponent(jLabel1) .addComponent(jLabel2)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent( txtCod, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup( javax.swing.GroupLayout.Alignment.LEADING, layout .createSequentialGroup() .addGroup( layout .createParallelGroup( javax.swing.GroupLayout .Alignment.TRAILING, false) .addComponent( txtPrecio, javax.swing.GroupLayout .Alignment.LEADING) .addComponent( txtKg, javax.swing.GroupLayout .Alignment.LEADING, javax.swing.GroupLayout .DEFAULT_SIZE, 40, Short.MAX_VALUE)) .addPreferredGap( javax.swing.LayoutStyle .ComponentPlacement.RELATED, javax.swing.GroupLayout .DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnGuardar)) .addComponent( txtNom, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .RELATED, 123, Short.MAX_VALUE) .addComponent( jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup( layout .createSequentialGroup() .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .RELATED) .addComponent(btnActualizarArt)))) .addComponent(btnBorrarArt)) .addContainerGap())); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent( txtCod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent( txtNom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent( txtPrecio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent( txtKg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnGuardar) .addComponent(btnActualizarArt))) .addComponent( jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 488, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnBorrarArt) .addContainerGap())); pack(); } // </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { fillGridText = new javax.swing.JLabel(); fillSeparator = new javax.swing.JSeparator(); backButton = new javax.swing.JButton(); solveButton = new javax.swing.JButton(); jSeparator1 = new javax.swing.JSeparator(); clearAllButton = new javax.swing.JButton(); unsolveButton = new javax.swing.JButton(); setBackground(new java.awt.Color(153, 204, 255)); setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 255), 5)); fillGridText.setText("Fill in the Sudoku grid:"); backButton.setText("Back"); backButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { backButtonActionPerformed(evt); } }); solveButton.setText("Solve"); solveButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { solveButtonActionPerformed(evt); } }); clearAllButton.setText("Clear All"); clearAllButton.setToolTipText("Clear all the numbers."); clearAllButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { clearAllButtonActionPerformed(evt); } }); unsolveButton.setText("Unsolve"); unsolveButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { unsolveButtonActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 290, Short.MAX_VALUE) .addGroup( layout .createSequentialGroup() .addComponent(backButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(clearAllButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE) .addComponent(unsolveButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(solveButton)) .addComponent( fillSeparator, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 290, Short.MAX_VALUE) .addComponent( fillGridText, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent(fillGridText) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( fillSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 198, Short.MAX_VALUE) .addComponent( jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(solveButton) .addComponent(backButton) .addComponent(clearAllButton) .addComponent(unsolveButton)) .addGap(26, 26, 26))); } // </editor-fold>//GEN-END:initComponents
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jTabbedPane1 = new javax.swing.JTabbedPane(); ProfileTab = new javax.swing.JPanel(); pro_pic_label = new javax.swing.JLabel(); name_text = new javax.swing.JTextField(); name_label = new javax.swing.JLabel(); ChooseImage = new javax.swing.JButton(); pro_pic_display = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); GeneralTab = new javax.swing.JPanel(); Display_button = new javax.swing.JLabel(); color_button = new javax.swing.JButton(); jScrollPane2 = new javax.swing.JScrollPane(); font_style_list = new javax.swing.JList(); jScrollPane3 = new javax.swing.JScrollPane(); font_size_list = new javax.swing.JList(); jScrollPane4 = new javax.swing.JScrollPane(); DisplayArea_text = new javax.swing.JTextArea(); Font_size_label = new javax.swing.JLabel(); Font_label = new javax.swing.JLabel(); Font_Color_button = new javax.swing.JButton(); ChatsTab = new javax.swing.JPanel(); Backup_Button = new javax.swing.JLabel(); Backup_textfield = new javax.swing.JTextField(); backup_folder_button = new javax.swing.JButton(); Backup_Chat_label = new javax.swing.JLabel(); backup_chat_button = new javax.swing.JButton(); NotificationsTab = new javax.swing.JPanel(); Sound = new javax.swing.JCheckBox(); jLabel1 = new javax.swing.JLabel(); Download_Textfield = new javax.swing.JTextField(); Download_button = new javax.swing.JButton(); AboutTab = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); cancel_button = new javax.swing.JButton(); Save_Exit = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); pro_pic_label.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N pro_pic_label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); pro_pic_label.setText("Profile Picture"); name_text.setText(xchat.my_name); name_text.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { name_textActionPerformed(evt); } }); name_label.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N name_label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); name_label.setText("Name"); ChooseImage.setText("Choose Image"); ChooseImage.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { ChooseImageMouseClicked(evt); } }); ChooseImage.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ChooseImageActionPerformed(evt); } }); javax.swing.GroupLayout pro_pic_displayLayout = new javax.swing.GroupLayout(pro_pic_display); pro_pic_display.setLayout(pro_pic_displayLayout); pro_pic_displayLayout.setHorizontalGroup( pro_pic_displayLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)); pro_pic_displayLayout.setVerticalGroup( pro_pic_displayLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)); javax.swing.GroupLayout ProfileTabLayout = new javax.swing.GroupLayout(ProfileTab); ProfileTab.setLayout(ProfileTabLayout); ProfileTabLayout.setHorizontalGroup( ProfileTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( ProfileTabLayout.createSequentialGroup() .addGap(30, 30, 30) .addGroup( ProfileTabLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup( ProfileTabLayout.createSequentialGroup() .addComponent( pro_pic_label, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent( pro_pic_display, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent( ChooseImage, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup( ProfileTabLayout.createSequentialGroup() .addComponent( name_label, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( name_text, javax.swing.GroupLayout.PREFERRED_SIZE, 303, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(188, Short.MAX_VALUE))); ProfileTabLayout.setVerticalGroup( ProfileTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( ProfileTabLayout.createSequentialGroup() .addGap(33, 33, 33) .addGroup( ProfileTabLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( name_label, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( name_text, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup( ProfileTabLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent( ChooseImage, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( pro_pic_display, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( pro_pic_label, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jTabbedPane1.addTab("Profile", ProfileTab); Display_button.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N Display_button.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); Display_button.setText("Display"); color_button.setText("Background Color"); color_button.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { color_buttonActionPerformed(evt); } }); font_style_list.setModel( new javax.swing.AbstractListModel() { String[] strings = { "Arial", "Bradley Hand ITC", "Castellar", "Chiller", "Comic Sans MS", "Courier New", "Lucida Calligraphy", "Papyrus", "Tahoma", "Times New Roman" }; public int getSize() { return strings.length; } public Object getElementAt(int i) { return strings[i]; } }); font_style_list.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); font_style_list.setSelectedIndex(0); font_style_list.addListSelectionListener( new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent evt) { font_style_listValueChanged(evt); } }); jScrollPane2.setViewportView(font_style_list); font_style_list.setSelectedIndex(0); font_size_list.setModel( new javax.swing.AbstractListModel() { String[] strings = {"very small", "small", "medium", "huge", "vey huge"}; public int getSize() { return strings.length; } public Object getElementAt(int i) { return strings[i]; } }); font_size_list.setSelectedIndex(1); font_size_list.addListSelectionListener( new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent evt) { font_size_listValueChanged(evt); } }); jScrollPane3.setViewportView(font_size_list); jScrollPane4.setHorizontalScrollBarPolicy( javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); jScrollPane4.setVerticalScrollBarPolicy( javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); DisplayArea_text.setEditable(false); DisplayArea_text.setColumns(20); DisplayArea_text.setRows(5); DisplayArea_text.setText("AaBbYyZz"); DisplayArea_text.setAutoscrolls(false); DisplayArea_text.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); jScrollPane4.setViewportView(DisplayArea_text); Font_size_label.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N Font_size_label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); Font_size_label.setText("Font size"); Font_label.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N Font_label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); Font_label.setText("Font "); Font_Color_button.setText("Font Color"); Font_Color_button.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Font_Color_buttonActionPerformed(evt); } }); javax.swing.GroupLayout GeneralTabLayout = new javax.swing.GroupLayout(GeneralTab); GeneralTab.setLayout(GeneralTabLayout); GeneralTabLayout.setHorizontalGroup( GeneralTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( GeneralTabLayout.createSequentialGroup() .addGap(52, 52, 52) .addGroup( GeneralTabLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( color_button, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE) .addComponent( Display_button, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( Font_Color_button, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(36, 36, 36) .addGroup( GeneralTabLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addGroup( GeneralTabLayout.createSequentialGroup() .addComponent( jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(40, 40, 40) .addComponent( jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent( jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 259, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(107, Short.MAX_VALUE)) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, GeneralTabLayout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( Font_label, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(53, 53, 53) .addComponent( Font_size_label, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(97, 97, 97))); GeneralTabLayout.setVerticalGroup( GeneralTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( GeneralTabLayout.createSequentialGroup() .addContainerGap() .addGroup( GeneralTabLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addGroup( GeneralTabLayout.createSequentialGroup() .addComponent( Font_size_label, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(8, 8, 8) .addComponent( jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, GeneralTabLayout.createSequentialGroup() .addComponent( Font_label, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( GeneralTabLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup( GeneralTabLayout.createSequentialGroup() .addComponent( color_button, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .UNRELATED) .addComponent( Font_Color_button, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))) .addGap(18, 18, 18) .addGroup( GeneralTabLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( Display_button, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jTabbedPane1.addTab("General", GeneralTab); Backup_Button.setText("Backup Folder"); Backup_textfield.setEditable(false); Backup_textfield.setText(xchat.path_save_chat); Backup_textfield.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Backup_textfieldActionPerformed(evt); } }); backup_folder_button.setText("Choose Folder"); backup_folder_button.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { backup_folder_buttonActionPerformed(evt); } }); Backup_Chat_label.setText("Backup Current Chat"); backup_chat_button.setText("OK"); backup_chat_button.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { backup_chat_buttonActionPerformed(evt); } }); javax.swing.GroupLayout ChatsTabLayout = new javax.swing.GroupLayout(ChatsTab); ChatsTab.setLayout(ChatsTabLayout); ChatsTabLayout.setHorizontalGroup( ChatsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( ChatsTabLayout.createSequentialGroup() .addGap(57, 57, 57) .addGroup( ChatsTabLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( Backup_Chat_label, javax.swing.GroupLayout.PREFERRED_SIZE, 114, Short.MAX_VALUE) .addComponent( Backup_Button, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( Backup_textfield, javax.swing.GroupLayout.PREFERRED_SIZE, 227, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(30, 30, 30) .addComponent( backup_folder_button, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(87, Short.MAX_VALUE)) .addGroup( ChatsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( ChatsTabLayout.createSequentialGroup() .addGap(185, 185, 185) .addComponent( backup_chat_button, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(347, Short.MAX_VALUE)))); ChatsTabLayout.setVerticalGroup( ChatsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( ChatsTabLayout.createSequentialGroup() .addGap(44, 44, 44) .addGroup( ChatsTabLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( Backup_Button, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( Backup_textfield, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( backup_folder_button, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 44, Short.MAX_VALUE) .addComponent( Backup_Chat_label, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(59, 59, 59)) .addGroup( ChatsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, ChatsTabLayout.createSequentialGroup() .addContainerGap(128, Short.MAX_VALUE) .addComponent( backup_chat_button, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(56, 56, 56)))); jTabbedPane1.addTab("Chats ", ChatsTab); Sound.setSelected(true); Sound.setText("Sound"); Sound.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { SoundActionPerformed(evt); } }); jLabel1.setText("Download Folder"); Download_Textfield.setEditable(false); Download_Textfield.setText(xchat.path_save_download); Download_button.setText("Choose Folder"); Download_button.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Download_buttonActionPerformed(evt); } }); javax.swing.GroupLayout NotificationsTabLayout = new javax.swing.GroupLayout(NotificationsTab); NotificationsTab.setLayout(NotificationsTabLayout); NotificationsTabLayout.setHorizontalGroup( NotificationsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( NotificationsTabLayout.createSequentialGroup() .addGap(36, 36, 36) .addGroup( NotificationsTabLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addGroup( NotificationsTabLayout.createSequentialGroup() .addComponent( jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( Download_Textfield, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent( Download_button, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent( Sound, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(36, Short.MAX_VALUE))); NotificationsTabLayout.setVerticalGroup( NotificationsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( NotificationsTabLayout.createSequentialGroup() .addGap(35, 35, 35) .addComponent( Sound, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( NotificationsTabLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( Download_button, javax.swing.GroupLayout.DEFAULT_SIZE, 34, Short.MAX_VALUE) .addComponent( jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( Download_Textfield, javax.swing.GroupLayout.DEFAULT_SIZE, 34, Short.MAX_VALUE)) .addContainerGap(108, Short.MAX_VALUE))); jTabbedPane1.addTab("Sounds & Download", NotificationsTab); AboutTab.setAutoscrolls(true); AboutTab.setEnabled(false); jScrollPane1.setHorizontalScrollBarPolicy( javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); jScrollPane1.setVerticalScrollBarPolicy( javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); jScrollPane1.setOpaque(false); jTextArea1.setEditable(false); jTextArea1.setBackground(new java.awt.Color(240, 240, 240)); jTextArea1.setColumns(20); jTextArea1.setFont(new java.awt.Font("Times New Roman", 0, 14)); // NOI18N jTextArea1.setLineWrap(true); jTextArea1.setRows(5); jTextArea1.setText( "XChat is based on software from JAVA, which has been doubled licensed under the Narendari Modi Development and Distribution (NMDD) and the Barack Obama License (BOL) version 9.9.9.9.9.9... with Rahul Gandhi exception. For more information, please visit http://www.google.co.in/ "); jTextArea1.setWrapStyleWord(true); jTextArea1.setBorder(null); jTextArea1.setOpaque(false); jScrollPane1.setViewportView(jTextArea1); jLabel3.setIcon( new javax.swing.ImageIcon(getClass().getResource("/xchat/Barack Obama.jpg"))); // NOI18N jLabel4.setIcon( new javax.swing.ImageIcon(getClass().getResource("/xchat/X (2).jpg"))); // NOI18N jLabel5.setIcon( new javax.swing.ImageIcon( getClass().getResource("/xchat/Narendra-Modi-In-Brown-Coat.jpg"))); // NOI18N javax.swing.GroupLayout AboutTabLayout = new javax.swing.GroupLayout(AboutTab); AboutTab.setLayout(AboutTabLayout); AboutTabLayout.setHorizontalGroup( AboutTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( AboutTabLayout.createSequentialGroup() .addContainerGap() .addGroup( AboutTabLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jScrollPane1) .addGroup( AboutTabLayout.createSequentialGroup() .addComponent( jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(50, 50, 50) .addComponent( jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 54, Short.MAX_VALUE) .addComponent( jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap())); AboutTabLayout.linkSize( javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel3, jLabel5}); AboutTabLayout.setVerticalGroup( AboutTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, AboutTabLayout.createSequentialGroup() .addContainerGap() .addGroup( AboutTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addComponent( jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jLabel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())); AboutTabLayout.linkSize( javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jLabel3, jLabel5}); jTabbedPane1.addTab("About", AboutTab); cancel_button.setText("Cancel"); cancel_button.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancel_buttonActionPerformed(evt); } }); Save_Exit.setText("Save and Exit"); Save_Exit.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Save_ExitActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent( Save_Exit, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent( cancel_button, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.TRAILING)) .addContainerGap())); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addContainerGap() .addComponent( jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( cancel_button, javax.swing.GroupLayout.DEFAULT_SIZE, 35, Short.MAX_VALUE) .addComponent( Save_Exit, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); pack(); } // </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jScrollPane2 = new javax.swing.JScrollPane(); medicine = new javax.swing.JTextArea(); jScrollPane3 = new javax.swing.JScrollPane(); symptoms = new javax.swing.JTextArea(); jButton2 = new javax.swing.JButton(); jLabel4 = new javax.swing.JLabel(); id = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); name = new javax.swing.JTextField(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel1.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N jLabel1.setText(" DIAGONOSTIC REPORT"); jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel2.setText("SYMPTOMS:"); jLabel3.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel3.setText("MEDICINE PRESCRIBED:"); jButton1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jButton1.setText("OK"); jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); jButton1.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); medicine.setColumns(20); medicine.setLineWrap(true); medicine.setRows(5); medicine.setBorder( javax.swing.BorderFactory.createEtchedBorder( new java.awt.Color(51, 51, 51), new java.awt.Color(204, 204, 204))); jScrollPane2.setViewportView(medicine); symptoms.setColumns(20); symptoms.setLineWrap(true); symptoms.setRows(5); symptoms.setBorder( javax.swing.BorderFactory.createEtchedBorder( new java.awt.Color(51, 51, 51), new java.awt.Color(204, 204, 204))); jScrollPane3.setViewportView(symptoms); jButton2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jButton2.setText("CANCEL"); jButton2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); jButton2.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jLabel4.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel4.setText("Registration Id"); jLabel5.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel5.setText("Patient Name"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addGap(250, 250, 250) .addComponent(jButton1) .addGap(43, 43, 43) .addComponent(jButton2)) .addGroup( jPanel1Layout .createSequentialGroup() .addGap(99, 99, 99) .addComponent( jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 318, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout .createSequentialGroup() .addGap(23, 23, 23) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 510, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3) .addComponent(jLabel2) .addGroup( jPanel1Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup( jPanel1Layout .createSequentialGroup() .addComponent(jLabel4) .addGap(18, 18, 18) .addComponent( id, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jLabel5) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .UNRELATED) .addComponent(name)) .addComponent( jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 510, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(31, 31, 31))); jPanel1Layout.setVerticalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addGap(11, 11, 11) .addComponent(jLabel1) .addGap(38, 38, 38) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent( id, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent( name, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 255, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButton1) .addComponent(jButton2)))); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addComponent( jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE))); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); pack(); } // </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanel1.setBackground(new java.awt.Color(255, 153, 153)); jLabel1.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N jLabel1.setForeground(new java.awt.Color(51, 51, 255)); jLabel1.setText("SORRY! THIS STAFF MEMBER IS NOT IN DATABASE"); jButton1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jButton1.setText("OK"); jButton1.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addGap(54, 54, 54) .addComponent(jLabel1)) .addGroup( jPanel1Layout .createSequentialGroup() .addGap(242, 242, 242) .addComponent(jButton1))) .addContainerGap(61, Short.MAX_VALUE))); jPanel1Layout.setVerticalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addGap(90, 90, 90) .addComponent(jLabel1) .addGap(33, 33, 33) .addComponent(jButton1) .addContainerGap(50, Short.MAX_VALUE))); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); pack(); } // </editor-fold>
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); jList1 = new javax.swing.JList(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); firstName = new javax.swing.JTextField(); lastName = new javax.swing.JTextField(); cellPhone = new javax.swing.JTextField(); homePhone = new javax.swing.JTextField(); gradYear = new javax.swing.JTextField(); gender = new javax.swing.JComboBox(); cancelButton = new javax.swing.JButton(); submitButton = new javax.swing.JButton(); jLabel7 = new javax.swing.JLabel(); studentId = new javax.swing.JTextField(); jList1.setModel( new javax.swing.AbstractListModel() { String[] strings = {"Item 1", "Item 2", "Item 3", "Item 4", "Item 5"}; public int getSize() { return strings.length; } public Object getElementAt(int i) { return strings[i]; } }); jScrollPane1.setViewportView(jList1); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setAutoRequestFocus(false); jLabel1.setText("First Name"); jLabel2.setText("Last Name"); jLabel3.setText("Cell Phone No."); jLabel4.setText("Home Phone No."); jLabel5.setText("Graduation Year"); jLabel6.setText("Gender"); gender.setModel( new javax.swing.DefaultComboBoxModel( new String[] {"Enter Gender:", "Male", "Female", "Other"})); gender.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { genderActionPerformed(evt); } }); cancelButton.setText("Cancel"); cancelButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelButtonActionPerformed(evt); } }); submitButton.setText("Submit"); submitButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { submitButtonActionPerformed(evt); } }); jLabel7.setText("Student ID"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addComponent(cancelButton) .addGap(74, 74, 74)) .addGroup( layout .createSequentialGroup() .addGroup( layout .createParallelGroup( javax.swing.GroupLayout .Alignment.LEADING) .addComponent(jLabel1) .addComponent( jLabel3, javax.swing.GroupLayout .DEFAULT_SIZE, javax.swing.GroupLayout .DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel4) .addComponent(jLabel5) .addGroup( layout .createSequentialGroup() .addComponent(jLabel2) .addGap( 0, 0, Short.MAX_VALUE))) .addPreferredGap( javax.swing.LayoutStyle .ComponentPlacement.RELATED))) .addGroup( layout .createSequentialGroup() .addComponent(jLabel7) .addGap(56, 56, 56))) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(submitButton) .addComponent( firstName, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE) .addComponent( cellPhone, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE) .addComponent( homePhone, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE) .addComponent( gradYear, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE) .addComponent( lastName, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE) .addComponent( studentId, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE))) .addGroup( layout .createSequentialGroup() .addComponent(jLabel6) .addGap(81, 81, 81) .addComponent(gender, 0, 146, Short.MAX_VALUE))) .addContainerGap())); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent( firstName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(13, 13, 13) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( lastName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent( cellPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent( homePhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent( gradYear, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel7) .addComponent( studentId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6) .addComponent( gender, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(16, 16, 16) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(cancelButton) .addComponent(submitButton)) .addContainerGap())); pack(); } // </editor-fold>//GEN-END:initComponents
private void initComponents() { splitPaneMain = new javax.swing.JSplitPane(); // // splitPanel = new javax.swing.JSplitPane(); splitPanelLeft = new javax.swing.JSplitPane(); graphOptionsPanel = new javax.swing.JPanel(); graphPanel = new javax.swing.JPanel(); rightPanel = new javax.swing.JPanel(); generalPanel = new javax.swing.JPanel(); nameTextField = new javax.swing.JTextField(); labelForName = new javax.swing.JLabel(); blocksPanel = new javax.swing.JPanel(); addBlockButton = new javax.swing.JButton(); removeBlockButton = new javax.swing.JButton(); adjustBlockButton = new javax.swing.JButton(); portsPanel = new javax.swing.JPanel(); addPortButton = new javax.swing.JButton(); removePortButton = new javax.swing.JButton(); adjustPortButton = new javax.swing.JButton(); blockRelationsPanel = new javax.swing.JPanel(); addRelationButton = new javax.swing.JButton(); removeRelationButton = new javax.swing.JButton(); splitPanelLeft.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); graphOptionsPanel.setLayout( new javax.swing.BoxLayout(graphOptionsPanel, javax.swing.BoxLayout.PAGE_AXIS)); topOptionsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Mouse Mode")); graphOptionsPanel.add(topOptionsPanel); bottomOptionsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Layout")); graphOptionsPanel.add(bottomOptionsPanel); gm = new DefaultModalGraphMouse(); JComboBox modeBox = gm.getModeComboBox(); topOptionsPanel.add(modeBox); PortConnections pconnsInst = PortConnections.getInstance(); vv = new VisualizationViewer(new CircleLayout(pconnsInst)); // create the transformers // edge label final Transformer edgeLabel = new Transformer() { public String transform(Object obj) { if (obj instanceof InteractionArc) { InteractionArc arc = (InteractionArc) obj; return arc.getArcStateShort(); } return "unknown"; } }; this.edgeLabel = edgeLabel; vv.getRenderContext().setEdgeLabelTransformer(edgeLabel); vv.getRenderContext().setEdgeShapeTransformer(new EdgeShape.Line()); // options java.util.List<String> options = new ArrayList<String>(); options.add("FRLayout"); options.add("KKLayout"); options.add("CircleLayout"); options.add("SpringLayout"); options.add("SpringLayout2"); options.add("ISOMLayout"); layoutBox = new JComboBox(options.toArray()); layoutBox.setSelectedItem(options.get(0)); layoutBox.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { InteractionGraphs igraphs = InteractionGraphs.getInstance(); InteractionGraph graph = igraphs.getGraph(emidSelected); String selected = (String) ((JComboBox) e.getSource()).getSelectedItem(); if (selected.equals("FRLayout")) { vv = new VisualizationViewer(new FRLayout(graph)); } else if (selected.equals("KKLayout")) { vv = new VisualizationViewer(new KKLayout(graph)); } else if (selected.equals("CircleLayout")) { vv = new VisualizationViewer(new CircleLayout(graph)); } else if (selected.equals("SpringLayout")) { vv = new VisualizationViewer(new SpringLayout(graph)); } else if (selected.equals("SpringLayout2")) { vv = new VisualizationViewer(new SpringLayout2(graph)); } else if (selected.equals("ISOMLayout")) { vv = new VisualizationViewer(new ISOMLayout(graph)); } vv.getRenderContext().setVertexLabelTransformer(new ToStringLabeller()); vv.getRenderContext().setEdgeLabelTransformer(edgeLabel); vv.getRenderContext().setEdgeShapeTransformer(new EdgeShape.Line()); setVisualizationViewer(vv); } }); layoutBox.setSelectedItem("CircleLayout"); bottomOptionsPanel.add(layoutBox); splitPanelLeft.setTopComponent(graphOptionsPanel); javax.swing.GroupLayout graphPanelLayout = new javax.swing.GroupLayout(graphPanel); graphPanel.setLayout(graphPanelLayout); graphPanelLayout.setHorizontalGroup( graphPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 181, Short.MAX_VALUE)); graphPanelLayout.setVerticalGroup( graphPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 432, Short.MAX_VALUE)); // splitPanelLeft.setRightComponent(graphPanel); splitPaneMain.setLeftComponent(splitPanelLeft); rightPanel.setLayout(new javax.swing.BoxLayout(rightPanel, javax.swing.BoxLayout.PAGE_AXIS)); generalPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("General")); labelForName.setText("name"); nameTextField.setText("new"); javax.swing.GroupLayout generalPanelLayout = new javax.swing.GroupLayout(generalPanel); generalPanel.setLayout(generalPanelLayout); generalPanelLayout.setHorizontalGroup( generalPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( generalPanelLayout .createSequentialGroup() .addContainerGap() .addComponent(labelForName) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent( nameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(140, Short.MAX_VALUE))); generalPanelLayout.setVerticalGroup( generalPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( generalPanelLayout .createSequentialGroup() .addGroup( generalPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(labelForName) .addComponent( nameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(96, Short.MAX_VALUE))); rightPanel.add(generalPanel); blocksPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Blocks")); javax.swing.GroupLayout blocksPanelLayout = new javax.swing.GroupLayout(blocksPanel); blocksPanel.setLayout(blocksPanelLayout); blocksPanelLayout.setHorizontalGroup( blocksPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( blocksPanelLayout .createSequentialGroup() .addGap(179, 179, 179) .addGroup( blocksPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent( adjustBlockButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( removeBlockButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( addBlockButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 114, Short.MAX_VALUE)) .addContainerGap(158, Short.MAX_VALUE))); blocksPanelLayout.setVerticalGroup( blocksPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( blocksPanelLayout .createSequentialGroup() .addComponent(addBlockButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(removeBlockButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(adjustBlockButton) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); rightPanel.add(blocksPanel); portsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Ports")); javax.swing.GroupLayout portsPanelLayout = new javax.swing.GroupLayout(portsPanel); portsPanel.setLayout(portsPanelLayout); portsPanelLayout.setHorizontalGroup( portsPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( portsPanelLayout .createSequentialGroup() .addGap(177, 177, 177) .addGroup( portsPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent( adjustPortButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( removePortButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( addPortButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 115, Short.MAX_VALUE)) .addContainerGap(159, Short.MAX_VALUE))); portsPanelLayout.setVerticalGroup( portsPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( portsPanelLayout .createSequentialGroup() .addComponent(addPortButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(removePortButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(adjustPortButton) .addContainerGap(32, Short.MAX_VALUE))); rightPanel.add(portsPanel); blockRelationsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Block Relations")); javax.swing.GroupLayout blockRelationsPanelLayout = new javax.swing.GroupLayout(blockRelationsPanel); blockRelationsPanel.setLayout(blockRelationsPanelLayout); blockRelationsPanelLayout.setHorizontalGroup( blockRelationsPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( blockRelationsPanelLayout .createSequentialGroup() .addGap(177, 177, 177) .addGroup( blockRelationsPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent( removeRelationButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( addRelationButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 114, Short.MAX_VALUE)) .addContainerGap(159, Short.MAX_VALUE))); blockRelationsPanelLayout.setVerticalGroup( blockRelationsPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( blockRelationsPanelLayout .createSequentialGroup() .addComponent(addRelationButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(removeRelationButton) .addContainerGap(61, Short.MAX_VALUE))); rightPanel.add(blockRelationsPanel); splitPaneMain.setRightComponent(rightPanel); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( splitPaneMain, javax.swing.GroupLayout.DEFAULT_SIZE, 653, Short.MAX_VALUE)); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( splitPaneMain, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 541, Short.MAX_VALUE)); }
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jBFechar = new javax.swing.JButton(); jBAtualizar = new javax.swing.JButton(); jBPesquisar = new javax.swing.JButton(); jTFPesquisar = new javax.swing.JTextField(); jBMostrarTodos = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); // try{ dao = new SistemaDao2(); lista = new ArrayList<JobLote>(); lista = dao.retornaAndamentoLotesPCP(); modelo = new VisualizaDgqPcpTableModel(lista, colunas); tabela = new javax.swing.JTable(modelo); jToolBar1 = new javax.swing.JToolBar(); jLabel1 = new javax.swing.JLabel(); jLabelTotalPecas = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jBFechar.setText("Fechar"); jBFechar.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBFecharActionPerformed(evt); } }); jBFechar.addKeyListener( new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { jBFecharKeyTyped(evt); } }); jBAtualizar.setText("Atualizar - F3"); jBAtualizar.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBAtualizarActionPerformed(evt); } }); jBPesquisar.setText("Pesquisar"); jBPesquisar.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBPesquisarActionPerformed(evt); } }); jBPesquisar.addKeyListener( new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { jBPesquisarKeyTyped(evt); } }); jTFPesquisar.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N jTFPesquisar.setForeground(new java.awt.Color(255, 0, 0)); jTFPesquisar.setSelectedTextColor(new java.awt.Color(0, 0, 0)); jBMostrarTodos.setText("Mostrar Todos - F5"); jBMostrarTodos.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBMostrarTodosActionPerformed(evt); } }); jBMostrarTodos.addKeyListener( new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { jBMostrarTodosKeyTyped(evt); } }); sorter = new TableRowSorter<VisualizaDgqPcpTableModel>(modelo); tabela.setRowSorter(sorter); tabela.setModel(modelo); sorter.setComparator(1, comparadorInteiros); sorter.setComparator(8, comparador); tabela.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { tabelaMouseClicked(evt); } }); tabela.addKeyListener( new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { tabelaKeyTyped(evt); } }); jScrollPane1.setViewportView(tabela); // }catch(SQLException e){ // e.printStackTrace(); // } jToolBar1.setRollover(true); jLabel1.setText("Total Qtd. Transf: "); jToolBar1.add(jLabel1); jLabelTotalPecas.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jLabelTotalPecas.setForeground(new java.awt.Color(255, 0, 0)); jLabelTotalPecas.setText("jLabel2"); jToolBar1.add(jLabelTotalPecas); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addComponent(jBAtualizar) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 221, Short.MAX_VALUE) .addComponent(jBMostrarTodos) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent( jTFPesquisar, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jBPesquisar) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jBFechar, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jScrollPane1) .addComponent( jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGap(1, 1, 1) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent( jTFPesquisar, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 44, Short.MAX_VALUE) .addComponent( jBAtualizar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jBMostrarTodos, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jBPesquisar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jBFechar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 422, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))); pack(); } // </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel2 = new javax.swing.JPanel(); jLabel11 = new javax.swing.JLabel(); txtFecha = new javax.swing.JTextField(); jLabel12 = new javax.swing.JLabel(); txtHora = new javax.swing.JTextField(); labelusuario = new javax.swing.JLabel(); jLabel14 = new javax.swing.JLabel(); panelContenedor = new javax.swing.JPanel(); panelAgregar = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); tblLaboratorio = new javax.swing.JTable(); btnEliminar = new javax.swing.JButton(); btnAgregarLab = new javax.swing.JButton(); btnNuevo = new javax.swing.JButton(); btnSalir = new javax.swing.JButton(); panelEdicion = new javax.swing.JPanel(); btnAceptar = new javax.swing.JButton(); jScrollPane2 = new javax.swing.JScrollPane(); tblEditar = new javax.swing.JTable(); jLabel13 = new javax.swing.JLabel(); btnEditar = new javax.swing.JButton(); panelDatosL = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); txtRazonSocial = new javax.swing.JTextField(); cmbEspecialidad = new javax.swing.JComboBox(); txtCalle = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); txtNum = new javax.swing.JTextField(); jLabel4 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); cmbProvincia = new javax.swing.JComboBox(); jLabel7 = new javax.swing.JLabel(); cmbDepartamento = new javax.swing.JComboBox(); cmbLocalidad = new javax.swing.JComboBox(); jLabel5 = new javax.swing.JLabel(); cmbBarrio = new javax.swing.JComboBox(); jLabel8 = new javax.swing.JLabel(); cmbTipoTel = new javax.swing.JComboBox(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); txtTelefono = new javax.swing.JTextField(); txtEmail = new javax.swing.JTextField(); jLabel17 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); btnGuardar = new javax.swing.JButton(); setIconifiable(true); setMaximizable(true); setResizable(true); setTitle("Laboratorio"); jPanel2.setLayout(null); jLabel11.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N jLabel11.setText("Fecha"); jPanel2.add(jLabel11); jLabel11.setBounds(20, 10, 60, 20); jPanel2.add(txtFecha); txtFecha.setBounds(60, 10, 80, 20); jLabel12.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N jLabel12.setText("Hora"); jPanel2.add(jLabel12); jLabel12.setBounds(210, 10, 60, 20); jPanel2.add(txtHora); txtHora.setBounds(240, 10, 80, 20); labelusuario.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N labelusuario.setText("Usuario"); jPanel2.add(labelusuario); labelusuario.setBounds(620, 10, 50, 15); jLabel14.setIcon( new javax.swing.ImageIcon( getClass().getResource("/Imagenes/UsuarioLogueado.png"))); // NOI18N jPanel2.add(jLabel14); jLabel14.setBounds(670, 0, 30, 30); panelContenedor.setLayout(null); tblLaboratorio.setModel( new javax.swing.table.DefaultTableModel( new Object[][] {}, new String[] {"Nombre", "Especialidad", "Localidad"}) { boolean[] canEdit = new boolean[] {false, false, false}; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); tblLaboratorio.getTableHeader().setResizingAllowed(false); tblLaboratorio.getTableHeader().setReorderingAllowed(false); jScrollPane1.setViewportView(tblLaboratorio); btnEliminar.setIcon( new javax.swing.ImageIcon(getClass().getResource("/Imagenes/delete.png"))); // NOI18N btnAgregarLab.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N btnAgregarLab.setIcon( new javax.swing.ImageIcon(getClass().getResource("/Imagenes/icono_mas.png"))); // NOI18N btnAgregarLab.setText("Agregar"); btnAgregarLab.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnAgregarLabActionPerformed(evt); } }); javax.swing.GroupLayout panelAgregarLayout = new javax.swing.GroupLayout(panelAgregar); panelAgregar.setLayout(panelAgregarLayout); panelAgregarLayout.setHorizontalGroup( panelAgregarLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( panelAgregarLayout .createSequentialGroup() .addGroup( panelAgregarLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( panelAgregarLayout .createSequentialGroup() .addGap(233, 233, 233) .addComponent(btnAgregarLab) .addGap(0, 0, Short.MAX_VALUE)) .addGroup( panelAgregarLayout .createSequentialGroup() .addGap(44, 44, 44) .addComponent( jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 470, Short.MAX_VALUE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( btnEliminar, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap())); panelAgregarLayout.setVerticalGroup( panelAgregarLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( panelAgregarLayout .createSequentialGroup() .addContainerGap() .addComponent( btnAgregarLab, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE) .addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, panelAgregarLayout .createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent( btnEliminar, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(42, 42, 42))); panelContenedor.add(panelAgregar); panelAgregar.setBounds(80, 240, 570, 170); btnNuevo.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N btnNuevo.setIcon( new javax.swing.ImageIcon(getClass().getResource("/Imagenes/icononuevo.PNG"))); // NOI18N btnNuevo.setText("Nuevo"); btnNuevo.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnNuevoActionPerformed(evt); } }); panelContenedor.add(btnNuevo); btnNuevo.setBounds(170, 420, 100, 30); btnSalir.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N btnSalir.setIcon( new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Salir.png"))); // NOI18N btnSalir.setText("Salir"); btnSalir.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSalirActionPerformed(evt); } }); panelContenedor.add(btnSalir); btnSalir.setBounds(470, 420, 100, 30); panelEdicion.setLayout(null); btnAceptar.setIcon( new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Aceptar.png"))); // NOI18N btnAceptar.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnAceptarActionPerformed(evt); } }); panelEdicion.add(btnAceptar); btnAceptar.setBounds(630, 110, 49, 30); tblEditar.setModel( new javax.swing.table.DefaultTableModel( new Object[][] {}, new String[] {"Nombre", "Especialidad"}) { boolean[] canEdit = new boolean[] {false, false}; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); tblEditar.getTableHeader().setResizingAllowed(false); tblEditar.getTableHeader().setReorderingAllowed(false); jScrollPane2.setViewportView(tblEditar); panelEdicion.add(jScrollPane2); jScrollPane2.setBounds(90, 50, 530, 140); jLabel13.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N jLabel13.setText("Laboratorios"); panelEdicion.add(jLabel13); jLabel13.setBounds(300, 30, 100, 17); panelContenedor.add(panelEdicion); panelEdicion.setBounds(10, 0, 710, 220); btnEditar.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N btnEditar.setIcon( new javax.swing.ImageIcon(getClass().getResource("/Imagenes/editar.png"))); // NOI18N btnEditar.setText("Editar"); btnEditar.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnEditarActionPerformed(evt); } }); panelContenedor.add(btnEditar); btnEditar.setBounds(370, 420, 100, 30); panelDatosL.setBorder( javax.swing.BorderFactory.createTitledBorder( null, "Datos Laboratorio", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 0, 14))); // NOI18N panelDatosL.setLayout(null); jLabel1.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jLabel1.setText("Especialidad"); panelDatosL.add(jLabel1); jLabel1.setBounds(360, 30, 130, 20); txtRazonSocial.addKeyListener( new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtRazonSocialKeyTyped(evt); } }); panelDatosL.add(txtRazonSocial); txtRazonSocial.setBounds(90, 30, 210, 20); panelDatosL.add(cmbEspecialidad); cmbEspecialidad.setBounds(450, 30, 260, 20); txtCalle.addKeyListener( new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtCalleKeyTyped(evt); } }); panelDatosL.add(txtCalle); txtCalle.setBounds(90, 60, 250, 20); jLabel3.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jLabel3.setText("Calle"); panelDatosL.add(jLabel3); jLabel3.setBounds(50, 60, 90, 20); panelDatosL.add(txtNum); txtNum.setBounds(450, 60, 70, 20); jLabel4.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jLabel4.setText("Número"); panelDatosL.add(jLabel4); jLabel4.setBounds(390, 60, 110, 20); jLabel6.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jLabel6.setText("Provincia"); panelDatosL.add(jLabel6); jLabel6.setBounds(30, 90, 90, 20); panelDatosL.add(cmbProvincia); cmbProvincia.setBounds(90, 90, 200, 20); jLabel7.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jLabel7.setText("Departamento"); panelDatosL.add(jLabel7); jLabel7.setBounds(360, 90, 160, 20); panelDatosL.add(cmbDepartamento); cmbDepartamento.setBounds(450, 90, 190, 20); panelDatosL.add(cmbLocalidad); cmbLocalidad.setBounds(90, 130, 200, 20); jLabel5.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jLabel5.setText("Localidad"); panelDatosL.add(jLabel5); jLabel5.setBounds(30, 130, 110, 20); panelDatosL.add(cmbBarrio); cmbBarrio.setBounds(450, 130, 190, 20); jLabel8.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jLabel8.setText("Barrio"); panelDatosL.add(jLabel8); jLabel8.setBounds(410, 130, 140, 20); panelDatosL.add(cmbTipoTel); cmbTipoTel.setBounds(90, 160, 120, 20); jLabel9.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jLabel9.setText("Tipo Teléfono"); panelDatosL.add(jLabel9); jLabel9.setBounds(10, 160, 90, 20); jLabel10.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jLabel10.setText("Teléfono"); panelDatosL.add(jLabel10); jLabel10.setBounds(400, 160, 90, 20); txtTelefono.addKeyListener( new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtTelefonoKeyTyped(evt); } }); panelDatosL.add(txtTelefono); txtTelefono.setBounds(450, 160, 150, 20); panelDatosL.add(txtEmail); txtEmail.setBounds(90, 190, 240, 20); jLabel17.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jLabel17.setText("E-Mail"); panelDatosL.add(jLabel17); jLabel17.setBounds(50, 190, 70, 20); jLabel2.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jLabel2.setText("Nombre"); panelDatosL.add(jLabel2); jLabel2.setBounds(40, 30, 100, 20); panelContenedor.add(panelDatosL); panelDatosL.setBounds(10, 0, 720, 240); btnGuardar.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N btnGuardar.setIcon( new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Guardar.png"))); // NOI18N btnGuardar.setText("Guardar"); btnGuardar.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnGuardarActionPerformed(evt); } }); panelContenedor.add(btnGuardar); btnGuardar.setBounds(270, 420, 100, 30); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( panelContenedor, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 747, Short.MAX_VALUE)) .addContainerGap())); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGap(6, 6, 6) .addComponent( jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( panelContenedor, javax.swing.GroupLayout.DEFAULT_SIZE, 520, Short.MAX_VALUE) .addContainerGap())); pack(); } // </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { boardPane = new javax.swing.JLayeredPane(); eCatcher = new javax.swing.JPanel(); figurePan = new javax.swing.JPanel(); focusPan = new javax.swing.JPanel(); board = new javax.swing.JPanel(); boardPane.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); eCatcher.setBackground(new Color(0, 0, 0, 0)); eCatcher.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); eCatcher.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent evt) { eCatcherMouseReleased(evt); } public void mousePressed(java.awt.event.MouseEvent evt) { eCatcherMousePressed(evt); } }); eCatcher.addMouseMotionListener( new java.awt.event.MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { eCatcherMouseDragged(evt); } }); javax.swing.GroupLayout eCatcherLayout = new javax.swing.GroupLayout(eCatcher); eCatcher.setLayout(eCatcherLayout); eCatcherLayout.setHorizontalGroup( eCatcherLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 600, Short.MAX_VALUE)); eCatcherLayout.setVerticalGroup( eCatcherLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 600, Short.MAX_VALUE)); eCatcher.setBounds(0, 0, 600, 600); boardPane.add(eCatcher, javax.swing.JLayeredPane.DEFAULT_LAYER); figurePan.setBackground(new Color(0, 0, 0, 0)); figurePan.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); javax.swing.GroupLayout figurePanLayout = new javax.swing.GroupLayout(figurePan); figurePan.setLayout(figurePanLayout); figurePanLayout.setHorizontalGroup( figurePanLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 600, Short.MAX_VALUE)); figurePanLayout.setVerticalGroup( figurePanLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 600, Short.MAX_VALUE)); figurePan.setBounds(0, 0, 600, 600); boardPane.add(figurePan, javax.swing.JLayeredPane.DEFAULT_LAYER); focusPan.setBackground(new Color(0, 0, 0, 0)); focusPan.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); javax.swing.GroupLayout focusPanLayout = new javax.swing.GroupLayout(focusPan); focusPan.setLayout(focusPanLayout); focusPanLayout.setHorizontalGroup( focusPanLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 600, Short.MAX_VALUE)); focusPanLayout.setVerticalGroup( focusPanLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 600, Short.MAX_VALUE)); focusPan.setBounds(0, 0, 600, 600); boardPane.add(focusPan, javax.swing.JLayeredPane.DEFAULT_LAYER); javax.swing.GroupLayout boardLayout = new javax.swing.GroupLayout(board); board.setLayout(boardLayout); boardLayout.setHorizontalGroup( boardLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 600, Short.MAX_VALUE)); boardLayout.setVerticalGroup( boardLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 600, Short.MAX_VALUE)); board.setBounds(0, 0, 600, 600); boardPane.add(board, javax.swing.JLayeredPane.DEFAULT_LAYER); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 620, Short.MAX_VALUE) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent( boardPane, javax.swing.GroupLayout.PREFERRED_SIZE, 600, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap( javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 622, Short.MAX_VALUE) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent( boardPane, javax.swing.GroupLayout.PREFERRED_SIZE, 600, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap( javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))); } // </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { inputPanel = new javax.swing.JPanel(); inputLabel = new javax.swing.JLabel(); verLabel = new javax.swing.JLabel(); iconLabel = new javax.swing.JLabel(); textpane = new javax.swing.JScrollPane(); infoText = new javax.swing.JTextArea(); controlPanel = new javax.swing.JPanel(); choosecameraButton = new javax.swing.JButton(); startButton = new javax.swing.JButton(); stopButton = new javax.swing.JButton(); loadimageButton = new javax.swing.JButton(); setimagefolderButton = new javax.swing.JButton(); clearoutputButton = new javax.swing.JButton(); outputScrollpane = new javax.swing.JScrollPane(); outputTextarea = new javax.swing.JTextArea(); lcrLabel = new javax.swing.JLabel(); aboutLabel = new javax.swing.JLabel(); imagesScrollpane = new javax.swing.JScrollPane(); buttonBar = new javax.swing.JToolBar(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Live! Character Recognition"); setName("lcrFrame"); addWindowListener( new java.awt.event.WindowAdapter() { public void windowOpened(java.awt.event.WindowEvent evt) { formWindowOpened(evt); } }); inputPanel.setBackground(new java.awt.Color(153, 180, 209)); inputPanel.setBorder( javax.swing.BorderFactory.createTitledBorder( javax.swing.BorderFactory.createCompoundBorder( javax.swing.BorderFactory.createEtchedBorder( java.awt.Color.black, java.awt.Color.black), javax.swing.BorderFactory.createBevelBorder( javax.swing.border.BevelBorder.RAISED, java.awt.Color.black, java.awt.Color.black, java.awt.Color.black, java.awt.Color.black)), "Input", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.TOP, new java.awt.Font("OCR A Std", 0, 12), new java.awt.Color(0, 0, 0))); // NOI18N inputPanel.setName(""); inputPanel.setPreferredSize(new java.awt.Dimension(700, 500)); inputPanel.setVerifyInputWhenFocusTarget(false); inputLabel.setFont(new java.awt.Font("Arial Rounded MT Bold", 0, 24)); // NOI18N inputLabel.setForeground(new java.awt.Color(51, 51, 51)); inputLabel.setText("Live! Character Recognition"); verLabel.setFont(new java.awt.Font("Arial Rounded MT Bold", 0, 24)); // NOI18N verLabel.setForeground(new java.awt.Color(51, 51, 51)); verLabel.setText("Ver. 1.0"); iconLabel.setIcon( new javax.swing.ImageIcon(getClass().getResource("/images/icon.gif"))); // NOI18N textpane.setBackground(new java.awt.Color(153, 180, 209)); textpane.setBorder(null); textpane.setHorizontalScrollBarPolicy( javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); textpane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); infoText.setBackground(new java.awt.Color(153, 180, 209)); infoText.setColumns(20); infoText.setEditable(false); infoText.setFont(new java.awt.Font("Arial Rounded MT Bold", 0, 20)); // NOI18N infoText.setForeground(new java.awt.Color(0, 51, 51)); infoText.setLineWrap(true); infoText.setRows(5); infoText.setText( "You have not selected the camera or set a picture\n \nTo set a picture click [Set Image Folder...] and select the\nimage from [Images]. After that you can click [Load Image] to\nprocess it.\n\nOR\n\nClick [Choose Camera...] to select the appropriate camera.\nNext, you can click [Start] to start processing.\n"); textpane.setViewportView(infoText); javax.swing.GroupLayout inputPanelLayout = new javax.swing.GroupLayout(inputPanel); inputPanel.setLayout(inputPanelLayout); inputPanelLayout.setHorizontalGroup( inputPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( inputPanelLayout .createSequentialGroup() .addGroup( inputPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( inputPanelLayout .createSequentialGroup() .addGap(4, 4, 4) .addComponent(iconLabel) .addGap(46, 46, 46) .addGroup( inputPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(inputLabel) .addComponent(verLabel)) .addGap(0, 50, Short.MAX_VALUE)) .addComponent(textpane, javax.swing.GroupLayout.Alignment.TRAILING)) .addContainerGap())); inputPanelLayout.setVerticalGroup( inputPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( inputPanelLayout .createSequentialGroup() .addGroup( inputPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(iconLabel) .addGroup( inputPanelLayout .createSequentialGroup() .addComponent(inputLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(verLabel))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( textpane, javax.swing.GroupLayout.PREFERRED_SIZE, 303, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE))); controlPanel.setBorder( javax.swing.BorderFactory.createTitledBorder( javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED), "Controls", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.TOP, new java.awt.Font("OCR A Std", 0, 12))); // NOI18N choosecameraButton.setFont(new java.awt.Font("Trajan Pro", 0, 12)); // NOI18N choosecameraButton.setText("Choose Camera..."); choosecameraButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); choosecameraButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { choosecameraButtonActionPerformed(evt); } }); startButton.setFont(new java.awt.Font("Trajan Pro", 0, 12)); // NOI18N startButton.setText("Start"); startButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { startButtonActionPerformed(evt); } }); stopButton.setFont(new java.awt.Font("Trajan Pro", 0, 12)); // NOI18N stopButton.setText("Stop"); stopButton.setEnabled(false); stopButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { stopButtonActionPerformed(evt); } }); loadimageButton.setFont(new java.awt.Font("Trajan Pro", 0, 12)); // NOI18N loadimageButton.setText("Load Image"); loadimageButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); loadimageButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { loadimageButtonActionPerformed(evt); } }); setimagefolderButton.setFont(new java.awt.Font("Trajan Pro", 0, 12)); // NOI18N setimagefolderButton.setText("Set Image Folder..."); setimagefolderButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); setimagefolderButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { setimagefolderButtonActionPerformed(evt); } }); clearoutputButton.setFont(new java.awt.Font("Trajan Pro", 0, 12)); // NOI18N clearoutputButton.setText("Clear Output"); clearoutputButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { clearoutputButtonActionPerformed(evt); } }); javax.swing.GroupLayout controlPanelLayout = new javax.swing.GroupLayout(controlPanel); controlPanel.setLayout(controlPanelLayout); controlPanelLayout.setHorizontalGroup( controlPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( controlPanelLayout .createSequentialGroup() .addContainerGap() .addComponent(choosecameraButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(startButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(stopButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(setimagefolderButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(loadimageButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(clearoutputButton) .addContainerGap(252, Short.MAX_VALUE))); controlPanelLayout.setVerticalGroup( controlPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( controlPanelLayout .createSequentialGroup() .addGroup( controlPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(choosecameraButton) .addComponent(startButton) .addComponent(stopButton) .addComponent(setimagefolderButton) .addComponent(loadimageButton) .addComponent(clearoutputButton)) .addGap(0, 6, Short.MAX_VALUE))); outputScrollpane.setHorizontalScrollBar(null); outputTextarea.setColumns(20); outputTextarea.setEditable(false); outputTextarea.setFont(new java.awt.Font("Times New Roman", 0, 36)); // NOI18N outputTextarea.setLineWrap(true); outputTextarea.setRows(5); outputTextarea.setText( "Live! Character Recognition\nVer. 1.0\n\nYou have not selected the camera or set a picture\n \nTo set a picture click [Set Image Folder...] and select the\nimage from [Images]. After that you can click [Load Image] to\nprocess it.\n\nOR\n\nClick [Choose Camera...] to select the appropriate camera.\nNext, you can click [Start] to start processing."); outputTextarea.setBorder( javax.swing.BorderFactory.createTitledBorder( javax.swing.BorderFactory.createCompoundBorder( javax.swing.BorderFactory.createEtchedBorder( javax.swing.border.EtchedBorder.RAISED), javax.swing.BorderFactory.createBevelBorder( javax.swing.border.BevelBorder.LOWERED)), "Output", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.TOP, new java.awt.Font("OCR A Std", 0, 12))); // NOI18N outputTextarea.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR)); outputTextarea.setFocusable(false); outputScrollpane.setViewportView(outputTextarea); lcrLabel.setFont(new java.awt.Font("Vrinda", 0, 12)); // NOI18N lcrLabel.setText("Live! Character Recognition. Ver. 1.0"); lcrLabel.setToolTipText(""); aboutLabel.setFont(new java.awt.Font("Vrinda", 0, 12)); // NOI18N aboutLabel.setText("About"); aboutLabel.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); aboutLabel.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { aboutLabelMouseClicked(evt); } }); imagesScrollpane.setBorder( javax.swing.BorderFactory.createTitledBorder( javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2), "Images", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, new java.awt.Font("OCR A Std", 0, 12))); // NOI18N imagesScrollpane.setVerticalScrollBarPolicy( javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); buttonBar.setBorder(null); buttonBar.setFloatable(false); buttonBar.setRollover(true); imagesScrollpane.setViewportView(buttonBar); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent( imagesScrollpane, javax.swing.GroupLayout.Alignment.TRAILING) .addGroup( layout .createSequentialGroup() .addComponent( inputPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 658, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .RELATED) .addComponent( outputScrollpane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) .addComponent( controlPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addGroup( layout .createSequentialGroup() .addGap(287, 287, 287) .addComponent(lcrLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(aboutLabel) .addGap(8, 8, 8))) .addContainerGap())); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap(16, Short.MAX_VALUE) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( outputScrollpane, javax.swing.GroupLayout.DEFAULT_SIZE, 510, Short.MAX_VALUE) .addComponent( inputPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 510, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( controlPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( imagesScrollpane, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lcrLabel) .addComponent(aboutLabel)) .addContainerGap())); pack(); } // </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jComboBox1 = new javax.swing.JComboBox(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jComboBox1.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N jLabel1.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N jLabel1.setText("Hello, Username!"); jLabel2.setFont(new java.awt.Font("Segoe UI", 0, 16)); // NOI18N jLabel2.setText("Select town to continue."); jButton1.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N jButton1.setText("Check-In Section"); jButton1.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N jButton2.setText("Trend Graph Section"); jButton2.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addContainerGap() .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addGroup( jPanel1Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addComponent(jLabel2) .addGap(18, 18, 18) .addComponent( jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel1)) .addContainerGap()) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout .createSequentialGroup() .addComponent(jButton1) .addGap(35, 35, 35) .addComponent(jButton2) .addGap(37, 37, 37))))); jPanel1Layout.setVerticalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addGap(20, 20, 20) .addComponent(jLabel1) .addGap(41, 41, 41) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent( jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 50, Short.MAX_VALUE) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1) .addComponent(jButton2)) .addGap(19, 19, 19))); jLabel3.setText("jLabel3"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGap(129, 129, 129) .addComponent( jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(47, 47, 47) .addComponent(jLabel3) .addContainerGap(106, Short.MAX_VALUE))); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel3) .addGap(170, 170, 170)) .addGroup( layout .createSequentialGroup() .addGap(66, 66, 66) .addComponent( jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(89, Short.MAX_VALUE))); pack(); } // </editor-fold>//GEN-END:initComponents
private void setpanel() // <editor-fold defaultstate="collapsed" desc="comment"> { // </editor-fold> inputPanel.removeAll(); inputPanel.repaint(); inputLabel = new javax.swing.JLabel(); verLabel = new javax.swing.JLabel(); iconLabel = new javax.swing.JLabel(); textpane = new javax.swing.JScrollPane(); infoText = new javax.swing.JTextArea(); inputLabel.setFont(new java.awt.Font("Arial Rounded MT Bold", 0, 24)); // NOI18N inputLabel.setForeground(new java.awt.Color(51, 51, 51)); verLabel.setFont(new java.awt.Font("Arial Rounded MT Bold", 0, 24)); // NOI18N verLabel.setForeground(new java.awt.Color(51, 51, 51)); textpane.setBackground(new java.awt.Color(153, 180, 209)); textpane.setBorder(null); textpane.setHorizontalScrollBarPolicy( javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); textpane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); infoText.setBackground(new java.awt.Color(153, 180, 209)); infoText.setColumns(20); infoText.setEditable(false); infoText.setFont(new java.awt.Font("Arial Rounded MT Bold", 0, 20)); // NOI18N infoText.setForeground(new java.awt.Color(0, 51, 51)); infoText.setLineWrap(true); infoText.setRows(5); textpane.setViewportView(infoText); javax.swing.GroupLayout inputPanelLayout = new javax.swing.GroupLayout(inputPanel); inputPanel.setLayout(inputPanelLayout); inputPanelLayout.setHorizontalGroup( inputPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( inputPanelLayout .createSequentialGroup() .addGroup( inputPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( inputPanelLayout .createSequentialGroup() .addGap(4, 4, 4) .addComponent(iconLabel) .addGap(46, 46, 46) .addGroup( inputPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(verLabel) .addComponent(inputLabel)) .addGap(0, 0, Short.MAX_VALUE)) .addComponent( textpane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 614, Short.MAX_VALUE)) .addContainerGap())); inputPanelLayout.setVerticalGroup( inputPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( inputPanelLayout .createSequentialGroup() .addGroup( inputPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(iconLabel) .addGroup( inputPanelLayout .createSequentialGroup() .addComponent(inputLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(verLabel))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( textpane, javax.swing.GroupLayout.PREFERRED_SIZE, 303, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE))); inputLabel.setText("Live! Character Recognition"); verLabel.setText("Ver. 1.0"); infoText.append( "You have not selected the camera or set a picture\n\n" + "To set a picture click [Set Image Folder...] and select the" + "\nimage from [Images]. After that you can click [Load Image] to" + "\nprocess it.\n\nOR\n\nClick [Choose Camera...] to select the appropriate camera." + "\nNext, you can click [Start] to start processing."); iconLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/icon.gif"))); outputTextarea.setText( "Live! Character Recognition\nVer. 1.0\n\nYou have not " + "selected the camera or set a picture\n \nTo set a picture click [Set Image Folder...] and " + "select the\nimage from [Images]. " + "After that you can click [Load Image] to\nprocess it.\n\nOR\n\nClick [Choose Camera...] " + "to select the appropriate camera." + "\nNext, you can click [Start] to start processing."); }
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { closeButton = new javax.swing.JButton(); cancelAllButton = new javax.swing.JButton(); reportScrollPane = new javax.swing.JScrollPane(); reportPanel = new javax.swing.JPanel(); titleLabel = new javax.swing.JLabel(); titleSeparator = new javax.swing.JSeparator(); optionSeparator = new javax.swing.JSeparator(); setPreferredSize(new java.awt.Dimension(700, 400)); org.openide.awt.Mnemonics.setLocalizedText( closeButton, org.openide.util.NbBundle.getMessage( ReportGenerationPanel.class, "ReportGenerationPanel.closeButton.text")); // NOI18N closeButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { closeButtonActionPerformed(evt); } }); org.openide.awt.Mnemonics.setLocalizedText( cancelAllButton, org.openide.util.NbBundle.getMessage( ReportGenerationPanel.class, "ReportGenerationPanel.cancelAllButton.text")); // NOI18N cancelAllButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelAllButtonActionPerformed(evt); } }); reportScrollPane.setBorder( javax.swing.BorderFactory.createLineBorder(java.awt.SystemColor.activeCaptionBorder)); reportScrollPane.setVerticalScrollBarPolicy( javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); reportPanel.setPreferredSize(new java.awt.Dimension(600, 400)); javax.swing.GroupLayout reportPanelLayout = new javax.swing.GroupLayout(reportPanel); reportPanel.setLayout(reportPanelLayout); reportPanelLayout.setHorizontalGroup( reportPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 661, Short.MAX_VALUE)); reportPanelLayout.setVerticalGroup( reportPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 400, Short.MAX_VALUE)); reportScrollPane.setViewportView(reportPanel); titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD, 11)); org.openide.awt.Mnemonics.setLocalizedText( titleLabel, org.openide.util.NbBundle.getMessage( ReportGenerationPanel.class, "ReportGenerationPanel.titleLabel.text")); // NOI18N titleSeparator.setForeground(new java.awt.Color(0, 0, 0)); optionSeparator.setForeground(new java.awt.Color(0, 0, 0)); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(optionSeparator) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(reportScrollPane) .addComponent(titleSeparator, javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.LEADING, layout .createSequentialGroup() .addComponent(titleLabel) .addGap(0, 522, Short.MAX_VALUE)) .addGroup( layout .createSequentialGroup() .addGap(0, 380, Short.MAX_VALUE) .addComponent(cancelAllButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(closeButton))) .addContainerGap())); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent(titleLabel) .addGap(0, 0, 0) .addComponent( titleSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent( reportScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 290, Short.MAX_VALUE) .addGap(18, 18, 18) .addComponent( optionSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(closeButton) .addComponent(cancelAllButton)) .addContainerGap())); } // </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { imageInfoLabel = new javax.swing.JLabel(); imgNameLabel = new javax.swing.JLabel(); imgTypeLabel = new javax.swing.JLabel(); imgSectorSizeLabel = new javax.swing.JLabel(); imgNameValue = new javax.swing.JLabel(); imgTypeValue = new javax.swing.JLabel(); imgSectorSizeValue = new javax.swing.JLabel(); OKButton = new javax.swing.JButton(); imgTotalSizeLabel = new javax.swing.JLabel(); imgTotalSizeValue = new javax.swing.JLabel(); imgHashLabel = new javax.swing.JLabel(); imgHashValue = new javax.swing.JLabel(); imageInfoLabel.setFont(imageInfoLabel.getFont().deriveFont(Font.BOLD, 18)); imageInfoLabel.setText( org.openide.util.NbBundle.getMessage( ImageDetailsPanel.class, "ImageDetailsPanel.imageInfoLabel.text")); // NOI18N imgNameLabel.setText( org.openide.util.NbBundle.getMessage( ImageDetailsPanel.class, "ImageDetailsPanel.imgNameLabel.text")); // NOI18N imgTypeLabel.setText( org.openide.util.NbBundle.getMessage( ImageDetailsPanel.class, "ImageDetailsPanel.imgTypeLabel.text")); // NOI18N imgSectorSizeLabel.setText( org.openide.util.NbBundle.getMessage( ImageDetailsPanel.class, "ImageDetailsPanel.imgSectorSizeLabel.text")); // NOI18N imgNameValue.setText( org.openide.util.NbBundle.getMessage( ImageDetailsPanel.class, "ImageDetailsPanel.imgNameValue.text")); // NOI18N imgTypeValue.setText( org.openide.util.NbBundle.getMessage( ImageDetailsPanel.class, "ImageDetailsPanel.imgTypeValue.text")); // NOI18N imgSectorSizeValue.setText( org.openide.util.NbBundle.getMessage( ImageDetailsPanel.class, "ImageDetailsPanel.imgSectorSizeValue.text")); // NOI18N OKButton.setText( org.openide.util.NbBundle.getMessage( ImageDetailsPanel.class, "ImageDetailsPanel.OKButton.text")); // NOI18N imgTotalSizeLabel.setText( org.openide.util.NbBundle.getMessage( ImageDetailsPanel.class, "ImageDetailsPanel.imgTotalSizeLabel.text")); // NOI18N imgTotalSizeValue.setText( org.openide.util.NbBundle.getMessage( ImageDetailsPanel.class, "ImageDetailsPanel.imgTotalSizeValue.text")); // NOI18N imgHashLabel.setText( org.openide.util.NbBundle.getMessage( ImageDetailsPanel.class, "ImageDetailsPanel.imgHashLabel.text")); // NOI18N imgHashValue.setText( org.openide.util.NbBundle.getMessage( ImageDetailsPanel.class, "ImageDetailsPanel.imgHashValue.text")); // NOI18N javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGap(0, 68, Short.MAX_VALUE) .addComponent(imageInfoLabel) .addContainerGap(78, Short.MAX_VALUE)) .addGroup( layout .createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(imgNameLabel) .addComponent(imgTypeLabel) .addComponent(imgSectorSizeLabel) .addComponent(imgTotalSizeLabel) .addComponent(imgHashLabel)) .addGap(18, 18, 18) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(imgNameValue) .addComponent(imgTypeValue) .addComponent(imgSectorSizeValue) .addComponent(imgTotalSizeValue) .addComponent(imgHashValue)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup( layout .createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( OKButton, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGap(38, 38, 38) .addComponent(imageInfoLabel) .addGap(18, 18, 18) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup( layout .createSequentialGroup() .addComponent(imgNameValue) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(imgTypeValue) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(imgSectorSizeValue) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(imgTotalSizeValue) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(imgHashValue)) .addGroup( layout .createSequentialGroup() .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addGroup( layout .createSequentialGroup() .addComponent(imgNameLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .UNRELATED) .addComponent(imgTypeLabel) .addGap(25, 25, 25)) .addGroup( layout .createSequentialGroup() .addGap(50, 50, 50) .addComponent(imgSectorSizeLabel))) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(imgTotalSizeLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(imgHashLabel))) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 64, Short.MAX_VALUE) .addComponent(OKButton) .addContainerGap())); } // </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); // try{ dao = new bravox.sistema.dao.SistemaDao2(); lista = dao.retornaJobLoteFechadoPorWorkCenter(); modelo = new ExclusaoTableModel(lista, colunas); tabela = new javax.swing.JTable(modelo); jBExcluirLote = new javax.swing.JButton(); jBPesquisar = new javax.swing.JButton(); jBMostrarTodos = new javax.swing.JButton(); jBFechar = new javax.swing.JButton(); jBSelecionarTodos = new javax.swing.JButton(); jBDesmarcarTodos = new javax.swing.JButton(); jBAtualizar = new javax.swing.JButton(); jButtonRetrabalho = new javax.swing.JButton(); jTFPesquisar = new javax.swing.JFormattedTextField(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); tabela.setModel(modelo); sorter = new TableRowSorter<ExclusaoTableModel>(modelo); sorter.setComparator(1, comparadorInteiros); tabela.setRowSorter(sorter); tabela.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { tabelaMouseClicked(evt); } }); tabela.addPropertyChangeListener( new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { tabelaPropertyChange(evt); } }); tabela.addKeyListener( new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { tabelaKeyTyped(evt); } }); jScrollPane1.setViewportView(tabela); // }catch(SQLException e){ // JOptionPane.showMessageDialog(this, "Erro tabela exclusao: "+e); // } jBExcluirLote.setForeground(new java.awt.Color(255, 0, 0)); jBExcluirLote.setText("Excluir Lote"); jBExcluirLote.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBExcluirLoteActionPerformed(evt); } }); jBPesquisar.setText("Pesquisar"); jBPesquisar.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBPesquisarActionPerformed(evt); } }); jBPesquisar.addKeyListener( new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { jBPesquisarKeyTyped(evt); } }); jBMostrarTodos.setText("Mostrar Todos "); jBMostrarTodos.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBMostrarTodosActionPerformed(evt); } }); jBMostrarTodos.addKeyListener( new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { jBMostrarTodosKeyTyped(evt); } }); jBFechar.setText("Fechar"); jBFechar.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBFecharActionPerformed(evt); } }); jBFechar.addKeyListener( new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { jBFecharKeyTyped(evt); } }); jBSelecionarTodos.setText("Selecionar Todos"); jBSelecionarTodos.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBSelecionarTodosActionPerformed(evt); } }); jBDesmarcarTodos.setText("Limpar Seleção"); jBDesmarcarTodos.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBDesmarcarTodosActionPerformed(evt); } }); jBAtualizar.setText("Atualizar"); jBAtualizar.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBAtualizarActionPerformed(evt); } }); jButtonRetrabalho.setText("Retrabalho"); jButtonRetrabalho.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonRetrabalhoActionPerformed(evt); } }); jTFPesquisar.setForeground(new java.awt.Color(255, 51, 51)); jTFPesquisar.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N jTFPesquisar.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jTFPesquisarMouseClicked(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addComponent(jBExcluirLote) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jBSelecionarTodos) .addGap(9, 9, 9) .addComponent(jBDesmarcarTodos) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jBAtualizar) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonRetrabalho) .addGap(18, 18, 18) .addComponent(jBMostrarTodos) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jTFPesquisar, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jBPesquisar, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jBFechar) .addGap(5, 5, 5)) .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING)); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( jBPesquisar, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jBMostrarTodos, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jButtonRetrabalho, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jBAtualizar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jBDesmarcarTodos, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jBSelecionarTodos, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jBExcluirLote, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jBFechar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jTFPesquisar, javax.swing.GroupLayout.Alignment.TRAILING)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 525, javax.swing.GroupLayout.PREFERRED_SIZE))); pack(); } // </editor-fold>//GEN-END:initComponents
/** GUI element creating and arrangment. Partially generated using NetBeans IDE GUI utilities. */ @SuppressWarnings("unchecked") private void initComponents() { jButtonOldPackages = new JButton(); jTextDate = new JTextField(); jButtonSetLost = new JButton(); jButtonSetFound = new JButton(); jButtonShowLost = new JButton(); jButtonExit = new JButton(); jButtonReset = new JButton(); jScrollPane1 = new JScrollPane(); jListScans = new JList(); jScrollPane2 = new JScrollPane(); jListPackages = new JList(); jButtonSetFound.setEnabled(false); jButtonSetLost.setEnabled(false); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jButtonOldPackages.setText("Timed out packages"); jButtonOldPackages.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent event) { buttonOldPackagesActionPerformed(event); } }); ListSelectionListener listSelectionListener = new ListSelectionListener() { public void valueChanged(ListSelectionEvent event) { jListPackagesActionPertformed(event); } }; jButtonExit.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent event) { System.exit(0); } }); jButtonSetLost.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent event) { buttonSetLostActionPerformed(event); } }); jButtonSetFound.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent event) { buttonSetFoundActionPerformed(event); } }); jButtonShowLost.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent event) { buttonShowLostActionPerformed(event); } }); jButtonReset.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent event) { reset(event); } }); jListPackages.addListSelectionListener(listSelectionListener); jButtonSetLost.setText("List as Lost"); jButtonShowLost.setText("Lost Packages"); jButtonSetFound.setText("List as Found"); jButtonExit.setText("Logout"); jButtonReset.setText("Reset"); jScrollPane2.setViewportView(jListPackages); jScrollPane2.setPreferredSize(new Dimension(200, 200)); jListPackages.setFixedCellWidth(400); jScrollPane1.setViewportView(jListScans); // Layout javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent( jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(111, 111, 111) .addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(111, 111, 111) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jTextDate, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jButtonSetLost, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent( jButtonOldPackages, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent( jButtonShowLost, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent( jButtonSetFound, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jButtonReset, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jButtonExit, javax.swing.GroupLayout.Alignment.TRAILING)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGap(42, 42, 42) .addComponent( jTextDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonOldPackages) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonSetLost) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonSetFound) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonShowLost) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonReset) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonExit)) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 258, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent( jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE)) .addContainerGap())); pack(); }