Search Results

Search found 3 results on 1 pages for 'mnmyles'.

Page 1/1 | 1 

  • image upload-showing image on a form

    - by mnmyles
    hi guyz; i am using netbeans6.7.1 and phpmyadmin for my db to develop a java application to manage students records i want to upload students photos through browsing by clicking a browse buton which i have included in my interface I mean when i click on that button a JFilechooser pops up which filter only images(i have acomplished this) 1.) what i need is when i click on the "Attach button" of the JFilechooser, i want the image i chose to be attached to a jtextArea on the form i'm working with and the JFilechooser be diposed off. 2.) Also how i can save this form together with the image to a database table Is there a place where i can find a good guide/tutorial about that

    Read the article

  • populatin jComBobox with data from a db tbl(table) column

    - by mnmyles
    Hi guyz? I have a JComboBox which i have named "venue_JCB" i want to load details from a tbl column on form load at the initcomponets() i have declared the method "accessDBinit() ;" and after the initComponets() i have implemented the accessDBinit(); method as follows: ================================code============================ void accessDBinit() //Get Student List in the List Box { try { sql = "SELECT classLevel FROM class_session ORDER BY classLevel"; java.lang.Class.forName("com.mysql.jdbc.Driver"); Connection con2=DriverManager.getConnection("jdbc:mysql:///coast","root",""); Statement stmt2 = (Statement)con2.createStatement(); boolean hasResults = stmt2.execute(sql); if(hasResults) { ResultSet rs2 = stmt2.getResultSet(); if(rs2!=null) { displayResultsinit(rs2); } db.stmt.close(); } } catch(Exception e) { System.out.println(e+"Error in connection"); } } void displayResultsinit(ResultSet r) throws SQLException { ResultSetMetaData rmeta = r.getMetaData(); int numColumns=rmeta.getColumnCount(); while(r.next()) { for(int i=1;i<=numColumns;++i) { if(i<=numColumns) { venue_JCB.addItem(r.getString(i)); } } } } ====================================end of code=================================== the method works (Populate the combobox) but at the output bar i get the following on form load and also whenever i select a component from the combobox ======= error===== java.lang.NullPointerExceptionError in connection could some one please tell me where i am going wrong with the method? Thanks in advance regards Malachi

    Read the article

  • ID numbers generation

    - by mnmyles
    i am trying to code for my system in NetBeans IDE 6.5 to auto generate ID numbers for me like autonumbers in Ms Access. does any one have any ideas about going about that?i mean code for it.

    Read the article

1