Search Results

Search found 6 results on 1 pages for 'jouzef19'.

Page 1/1 | 1 

  • java.io.IOException: Premature EOF

    - by jouzef19
    Hi: I am trying to download an xml file using Stream and things was fine , until the xml size became bigger than 9 MB , so i've got this error java.io.IOException: Premature EOF this is the code BufferedInputStream bfi = null; try { bfi = new BufferedInputStream(new URL("The URL").openStream()); String name = "name.xml"; FileOutputStream fb = new FileOutputStream(name); BufferedOutputStream bout = new BufferedOutputStream(fb, 1024); byte[] data = new byte[1024]; int x = 0; while ((x = bfi.read(data, 0, 1024)) >= 0) { bout.write(data, 0, x); } this.deletePhishTankDatabase(this.recreateFileName()); ptda.insertDownloadTime(hour, day, month, year); bout.close(); bfi.close(); } catch (IOException ex) { Logger.getLogger(PhishTankDataBase.class.getName()).log(Level.SEVERE, null, ex); } finally { try { bfi.close(); } catch (IOException ex) { Logger.getLogger(PhishTankDataBase.class.getName()).log(Level.SEVERE, null, ex); } } } else { System.out.println("You can't do anything"); return; } thanks in advanced

    Read the article

  • Jlabel with alpha value

    - by jouzef19
    Hi: i have jLabel and i want to change its opacity (alpha value) each one second , i tried something like that but its not change each one second , jlable change its opacity with last alpha value . Color color = jLabel1.getBackground(); int alpha = 255; long initTime = System.currentTimeMillis(); while(true){ if(System.currentTimeMillis() - initTime >= 1000){ initTime = System.currentTimeMillis(); alpha -=1; Color color2 = new Color(color.getRed(),color.getGreen(),color.getBlue(),alpha); jLabel1.setBackground(color2); } if(alpha<=0) break; }

    Read the article

  • add Component to JPanel

    - by jouzef19
    Hi , I am using netBeans editor to create desktop application . and i want to add Component without using drag and drop way. I am trying code like this for adding JList to JPanel but nothing showed JList jl = new JList(); Vector<String> v= new Vector<String>(); v.add("one"); v.add("Two"); v.add("Three"); jl.setListData(v); JScrollPane js = new JScrollPane(jl); js.setLocation(50, 50); js.setSize(100, 100); js.setVisible(true); jPanel1.add(js);

    Read the article

  • get value from jtable

    - by jouzef19
    hi I have a jtable and I want the user to fill its cells then i get what he wrote! the problem is when i try getValueAt(row index,col index ) the programe give me null , and i am sure that the cell i choose has a value .

    Read the article

  • remove component from initComponent()

    - by jouzef19
    hi i am using netBeans editor to create desktop application , i did something wrong that generate three line of code in the initComponent() method related to connection with database. Then i removed the lines by opening the .java file in txt editor , but one of them keep coming back when i do anything with netBeans editor , So i want to delete this line from the netbeans itself . this is the line historyList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : ((javax.persistence.Query)null).getResultList(); and this is its declaration private java.util.List<idetect.History> historyList;

    Read the article

  • Store html into MYSql database

    - by jouzef19
    hello I'm try to store String (that contain html ) to mysql database by using Longtext data type. but its always says "You have an error in your SQL syntax". (note : i tried to store normal text , and its work)

    Read the article

1