35,618 Topics
![]() | |
Hello! I am using nebeans ide. I have made two jframes in my project, jframe1 and jframe2. One for login information and one for admin page. My project ran succesfuly i.e when i enter correct information on login page then admin page is displayed. But one problem is that after … | |
hi. I am using a jList, a button and a jtextfield. I want that the text or string written in jtextfield should add in the jlist on pressing button. But i could not find such method of jlist. Please tell me method of jlist by which i can add items … | |
hi james can you explain to me why every time I tried to used this line of code, i keep getting a syntax error. if(code.equals('L') || code.equals('l')) did i miss something, did i leave out someting | |
I have a file set in this folder "C:...../users" (is not real) I want to change the file path with code to set at "D:...../users" how can I do that? I want to change the path of a pic. after import it in database, change her file. how can I … | |
Hello to all! I made a small project using Netbeans8. I named my project smallCalcApp. And then i add a new JFrame File in my project and in that file I handled events of components which i put on form. When I run that file , it ran successfully and … | |
hello to all. I have used jdk 7 and now i have started to use netbeans8.0.1 i want to know that how to connect ms acces and sql server database using netbeans. Please send me procedure and sample code to connect to these two databases. | |
please guys...........how do i go about it, i am writig a project on file compressing system and i am to develop a sofware that would compress files and i have tried using vb.net but i am recieving alot of error messages..i need your help..and what is the best language to … | |
Im using this code to get image from SQLITE try{ String sql = "SELECT Photo FROM Pics WHERE InvoiceNumber=?"; pst = conn.prepareStatement(sql); rs=pst.executeQuery(); if(rs.next()){ byte[]imagedata = rs.getBytes("Photo"); format = new ImageIcon(imagedata); ImIc.setIcon(format); } }catch(Exception e){ JOptionPane.showMessageDialog(null, e); } `private ImageIcon format = null;` String filename = null; int s=0; byte[] … | |
Hi j I have a question and I am wondering if it can be answered. the question is, how do you calculate a teaching allowance and nis from the hours of work and rate of pay in java. | |
this is the code I create to import pics select image: JFileChooser chooser = new JFileChooser(); chooser.showOpenDialog(null); File f = chooser.getSelectedFile(); filename = f.getAbsolutePath(); file_picker1.setText(filename); try{ File image = new File (filename); FileInputStream fis = new FileInputStream(filename); ByteArrayOutputStream bos = new ByteArrayOutputStream(); byte[] buf = new byte[1024]; for (int readNum; … | |
Hi can someone help me to solve this problem : Create a program that would compute the grade of a student. This would ask for the name of the student, the overall total of written test, performance task and quarterly assessment. Afterwards, it would for the total score of the … | |
can anyone explain the meaning of Void in java..even though i referred many books,not able to understand clear as i am a learner.. | |
As part of a class in Java, the constuctor is supposed to throw a java.lang.IllegalArgumentException exception when an integer that is a field in the class, let's call it int N, is set to a negative vale. How do I set this up? | |
Respected members, I have this code chunk that should read multiple text files from a folder. I am later calculating their probability. For one file it is working fine and methods are also showing output. The first code is for ONE FILE named as English.txt. BufferedReader reader = new BufferedReader(new … | |
try{ String b = jTextField1.getText(); String sql = "SELECT * FROM DataImput ORDER BY InvoiceNumber=?"; pst=conn.prepareStatement(sql); pst.setString(1, b); rs=pst.executeQuery(); jTable1.setModel(DbUtils.resultSetToTableModel(rs)); } catch(Exception e){ JOptionPane.showMessageDialog(null, e); } finally{ try{ rs.close(); pst.close(); } catch(Exception e){ } } } this is the code I work to search. it actually work. but really weird. … | |
I set up a servlet project in eclipse and I am trying to connect a Access databasae(Ucanaccess) with it. By looking at below error, its look like I am missing jar files but if you take a look at attchement image. You will see all my jar files are in … | |
Hi Friends. I am facing Microsoft ODBC Driver error at run time in my program. I am using window 7, jdk 7 and Ms Access 2007. I am using "jdbc:odbc:JdbcOdbcDriver". I am giving code and error message below. Please tell me solution of this problem import java.sql.*; public class JdbcDMLEx2 … | |
HI to all! I am facing some exceptions in my database connectivity programs. I am using jdk7, window7 and Ms Access 2007. I am giving code of programs and exeption. import java.sql.*; public class ResultSetEx { public static void main(String[] args) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url = "jdbc:odbc:personDSN"; Connection … | |
I am trying to access a site that displays a camera monitoring my granddaughter's daycare. I have installed the latest version of Java on my Mac running Lion. I have added an exception for the website to the security settings for Java but it continues to block my access to … | |
Assume that a bank maintains two kinds of accounts for customers,one called as Savings account and the other as Current Account.The Savings account provide compound interest and withdrawal facilities but no cheque book facility.The Current Account provides cheque book facilty but no interest. Current Account holders should also maintain a … | |
Im having ap roblem with this.  after I press Save button that image show up it doesnt execute this code String te1 = tf1.getText(); String te2 = TA3.getText(); String te3 = TA2.getText(); String te4 = TA1.getText(); String te5 = tf2.getText(); String te6 = TL1.getText(); String sql = "UPDATE … | |
I am trying to connect access database with eclipse but it is not working. I first created data source in "ODBC Data Source Administrator(32-bits)" for windows than I add the jar file But I am getting an error: ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver SQLException: No suitable driver found for jdbc:odbc:J2EE_Database public class ex01 … | |
**Create a java program that will accept 3quizzes grades then display the average. Pahelp nmn po dito. about sia sa import java.util.scanner at system.in at scanner kailangan daw isearch muna yan pra mlaman kung panu gawin ung program. pahelp po salamat po :D** | |
can someone please tell me how to fix this thing? Im loosing my mind here. in a form this code work well. in other it doesn't I create an other form, import everything again and it is not working! try{ int row = Data_Table1.getSelectedRow(); String Table_click1 =(Data_Table1.getModel().getValueAt(row, 0).toString()); String sql … | |
I am developing a server which detects a device and its connection speed . is there any way i can detect a client's connection speed through response headers ?? public class Server_X { static int count = 0; public static void main(String args[]) { Socket s = null; ServerSocket ss2 … | |
Hi. Im trying to write specific text in a .txt file that file would be imported inside a folder I use this to create a file or folder File folder = new File("d:"+IN.getText()); if (folder.mkdir()){ System.out.println("Batch is created!"); }else{ System.out.println("This batch already exists."); } can create a .txt with a … | |
I am using Eclipse, java8 I am trying to connect access database with eclipse but it is not working. I first created data source in "ODBC Data Source Administrator(32-bits)" for windows and than I added the jar file (mysql-connector-java-5.1.35-bin) But I am getting an error: ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver at … | |
Help pls. I need to make a program. A program that calculates an employee’s pay per week. Obtain from the user an hourly pay rate and the number of hours worked for the week. Calculate their pay for the week (no overtime, and no taxes). | |
I'm curious, when setting the default close operation for JFrames, should you use JFrame's constants or WindowConstants' constants? As far as I can tell they're the same. Although, IntelliJ (not tested on other IDE's) prefers WindowConstants' EXIT_ON_CLOSE at least. So basically my question is, which one should be used? Which … | |
Hello, i am planning on designing an airline mobile application with android, as my testing devce. i'm doing this for the first time, can someone please guide me on how to do this? All help wiil be appreciated |
The End.