Ir ao conteúdo
  • Cadastre-se

Paulo Henrique Alves

Membro Júnior
  • Posts

    16
  • Cadastrado em

  • Última visita

Tudo que Paulo Henrique Alves postou

  1. Boa tarde galera, beleza? To com um problema infernal e não consigo resolver. Meu notebook ta com um problema, quando abro um vídeo no youtube ou algo que consome muita banda, a internet cai e não volta nem se tirar o cabo e colocar de novo, apenas quando desativo e ativo novamente o adaptador de rede. Tem dias que ta impossível de usar, eu dou play, a net cai, desativo e ativo de novo, roda 5 segundos e cai de novo. Já formatei o PC Já reinstalei os drivers Já mudei pra 10mbs full duplex pra testar Já desabilitei a opção "o computador pode desligar o dispositivo para economizar energia" Porém nada funcionou. Estou pensando que possa ser um problema físico. Alguém tem alguma ideia do que posso fazer ou testar?
  2. Já verificou o botão do gabinete? Tenta desconectar ele da placa-mãe e ligar utilizando uma chave de fenda. Geralmente é isso ou fonte.
  3. Andei pesquisando e o driver é esse: USBPCCam_v4.20.1.001.exe porém não consigo baixar ele de nenhum lugar.
  4. Já testei esse download e não funcionou. Mas só pra esclarecer, tenho que instalar e reiniciar o pc com a webcam desplugada ou não?
  5. Galera, tenho essa webcam da imagem já faz muuuito tempo. Essa é a webcam, eu não tenho certeza se o modelo é esse mesmo, mas pelo que pesquisei é esse sim. To usando windows 10 e nenhum driver que baixo eu consigo usar. Alguém pode me ajudar? Tentei usar o UsbView, mas aparece isso e não sei qual é o da minha webcam: Se alguém puder me ajudar, ficarei grato!
  6. Galera, to com um problema. Tenho uma gtx 1060 6gb e meu monitor é vga. To tentando configurar a bios pra poder usar ele na placa de video por um adaptador dvi, mas não ta salvando o display primário, eu mudo pra pcie e quando salvo ele volta pra cpu graphics. Alguém sabe por que não ta salvando?
  7. @adcarvalho Então amigo, o notebook lenovo não tem como ligar, alguma dica de como eu posso identificar o modelo? Do meu i3 eu consigo, sem problema.
  8. Bom galera, meu irmão trocou o notebook dele e tinha um lenovo todo quebrado la. Peguei o hd dele e troquei pelo meu que estava com 53% de vida. Gostaria de saber se o processador seria compatível, pois o meu é i3 e o dele é um i5. O modelo do notebook é um Lenovo ideapad S400. Ele é cinza por fora e preto por dentro. Se alguém puder me ajudar, ficarei muito grato!
  9. @psykotico Brother, já consegui fazer isso tudo, mas agora to com outro problema tenso! Pode me ajudar? Eu preciso usar um jComboBox pra puxar um registro de outra tabela na hora de cadastrar, tentei isso aqui mas não deu certo não. private void jButtonCadastrarActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: try { int codigo = 0; if (jTextFieldCodigo.getText() != null && !jTextFieldCodigo.getText().isEmpty()) { codigo = Integer.parseInt(jTextFieldCodigo.getText()); } ItemVendaService.cadastrarItemVendaService(codigo, jTextFieldQuantidade.getText()); //mensagem de sucesso JOptionPane.showMessageDialog(this, "ItemVenda Cadastrado com Sucesso!", "Sucesso", JOptionPane.INFORMATION_MESSAGE); limparCampos(); } catch (Exception ex) { JOptionPane.showMessageDialog(this, ex.getMessage(), "ERRO", JOptionPane.ERROR_MESSAGE); } } private void jButtonLimparActionPerformed(java.awt.event.ActionEvent evt) { limparCampos(); } private void cbVendaActionPerformed(java.awt.event.ActionEvent evt) { this.preencherComboBox(); } private void limparCampos() { jTextFieldQuantidade.setText(""); } public void preencherComboBox() { String sql = "Select *from venda"; Connection conn = null; try { Statement stmt = conn.createStatement(); String bd = "Select *from venda"; ResultSet rs = stmt.executeQuery(bd); while(rs.next()) { cbVenda.addItem(rs.getString("COD_CLIENTE")); } } catch(SQLException ex) { JOptionPane.showMessageDialog(null, ex); } }
  10. Mizeravi, acertoou! kkkkk Vou tentar aqui mano, muuito obrigado mesmo pela ajuda! Tem coisas que não ficam claras durante a aula. Desculpa o incomodo e obrigado mais uma vez!
  11. Eu gostaria de usar o mesmo botão e quando o usuário preenchesse os campos, aparecesse de acordo com cod ou nome e quando ele não digitasse nada e clicasse em consultar, aparecesse todos os clientes.
  12. Beleza cara, vou testar hoje na escola porque não estou conseguindo instalar o mysql administrator para poder dar restore no banco. Pode me ajudar com a parte do jframe? Aqui está assim: public class ConsultarClienteView extends javax.swing.JFrame { /** * Creates new form ConsultarClienteView */ public ConsultarClienteView() { 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() { jButton1 = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); jButtonConsultar = new javax.swing.JButton(); jScrollPane3 = new javax.swing.JScrollPane(); jTableTabela = new javax.swing.JTable(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); jTextField2 = new javax.swing.JTextField(); jButton1.setText("jButton1"); 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" } )); jScrollPane1.setViewportView(jTable1); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jButtonConsultar.setText("Consultar"); jButtonConsultar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonConsultarActionPerformed(evt); } }); jTableTabela.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" } )); jScrollPane3.setViewportView(jTableTabela); jLabel1.setText("Nome"); jLabel2.setText("Código"); 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.TRAILING, false) .addGroup(layout.createSequentialGroup() .addGap(66, 66, 66) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(74, 74, 74) .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(38, 38, 38) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonConsultar))) .addContainerGap(243, Short.MAX_VALUE)) ); 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.BASELINE) .addComponent(jLabel1) .addComponent(jLabel2) .addComponent(jButtonConsultar) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 63, Short.MAX_VALUE) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 284, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(38, 38, 38)) ); setSize(new java.awt.Dimension(777, 457)); }// </editor-fold> private void jButtonConsultarActionPerformed(java.awt.event.ActionEvent evt) { try { //Criar uma variável do tipo List<Cliente> e atribuir o retorno do método respectivo da camada Service. List<Cliente> listaClientes = ClienteService.consultarTodosClientesService(); //Se esta lista estiver nula ou vazia, exibir mensagem na tela. Caso contrário, preencher a tabela. if ((listaClientes == null) || (listaClientes.isEmpty())) { JOptionPane.showMessageDialog(this, "Nenhum item encontrado para esta lista", "Sem Resultado", JOptionPane.INFORMATION_MESSAGE); } else { //Carregar dados na tabela //Cria um DefaultTableModel DefaultTableModel modeloTabela = new DefaultTableModel(); //Monta os cabeçalhos das colunas da tabela modeloTabela.addColumn("Codigo"); modeloTabela.addColumn("Nome"); modeloTabela.addColumn("Sobrenome"); modeloTabela.addColumn("CPF"); modeloTabela.addColumn("Endereço"); modeloTabela.addColumn("Cidade"); modeloTabela.addColumn("UF"); modeloTabela.addColumn("Ativo"); //Para cada cliente retornado na lista, preencher uma tabela for (Cliente c : listaClientes) { //Cria uma linha 'genérica' com a quantidade de colunas do modelTabela Object[] vetorLinhas = new Object[modeloTabela.getColumnCount()]; //Preenche as colunas de cada linha do vetorLinhas para preencher com os dados do Cliente vetorLinhas[0] = c.getCodCliente(); vetorLinhas[1] = c.getNome(); vetorLinhas[2] = c.getSobrenome(); vetorLinhas[3] = c.getCpf(); vetorLinhas[4] = c.getEndereco(); vetorLinhas[5] = c.getCidade(); vetorLinhas[6] = c.getEstado(); vetorLinhas[7] = c.getFlgAtivo(); modeloTabela.addRow(vetorLinhas); } //desabilita selecao de colunas na tabela jTableTabela.setColumnSelectionAllowed(false); //desabilita selecao de celulas na tabela jTableTabela.setCellSelectionEnabled(false); //habilita selecao de uma unica linha jTableTabela.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); //finalmente adiciono o modelo ja pronto à minha tabela jTableTabela.setModel(modeloTabela); //mostra tabela jTableTabela.setVisible(true); } } catch (Exception ex) { JOptionPane.showMessageDialog(this, "ERRO:" + ex.getMessage(), "Erro", JOptionPane.ERROR_MESSAGE); } } /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(ConsultarClienteView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(ConsultarClienteView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(ConsultarClienteView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(ConsultarClienteView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new ConsultarClienteView().setVisible(true); } }); } Adicionei duas labels e caixas de texto pra cod e pra nome, mas não faço ideia do que fazer. Tenho que criar outro método ou adiciono algo nesse do mesmo botão?
  13. Mas usando isso eu consigo fazer a pesquisa por cod e por nome? ou tenho que criar outro pra pesquisar por nome? Mais uma coisa, consigo usar o mesmo jframe que usei pra consultar todos os clientes ou devo criar outro?
  14. Dessa forma que tu fez seria para mostrar ambos no mesmo método, tanto cod como nome?
  15. Olá, faço técnico de informática e o meu professor passou um método para consultar clientes e pediu para refaze-lo consultando por nome e por codigo. Alguém pode me ensinar como fazer? Preciso de uma explicação para poder aprender. Desde já, obrigado! public List<Cliente> consultarTodosClientesDAO() throws Exception { List<Cliente> listaSaida = new ArrayList<Cliente>(); Cliente cliente = null; PreparedStatement stmt = null; ResultSet rs = null; Connection conn = null; try { conn = ConnectionFactory.getConnection(); String sql = "SELECT " + "COD_CLIENTE " + ", NOME " + ", SOBRENOME " + ", CPF " + ", ENDERECO " + ", CIDADE " + ", ESTADO " + ", FLG_ATIVO " + "FROM CLIENTE"; stmt = conn.prepareStatement(sql); rs = stmt.executeQuery(); while (rs.next()) { cliente = new Cliente(); cliente.setCodCliente(rs.getInt("COD_CLIENTE")); cliente.setNome(rs.getString("NOME")); cliente.setSobrenome(rs.getString("SOBRENOME")); cliente.setCpf(rs.getString("CPF")); cliente.setEndereco(rs.getString("ENDERECO")); cliente.setCidade(rs.getString("CIDADE")); cliente.setEstado(rs.getString("ESTADO")); cliente.setFlgAtivo(rs.getBoolean("FLG_ATIVO")); listaSaida.add(cliente); cliente = null; } conn.close(); } catch (Exception ex) { throw ex; } return listaSaida; }

Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...