36,051 Topics

Member Avatar for
Member Avatar for Saboor880

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 …

Member Avatar for peter_budo
0
248
Member Avatar for Saboor880

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 …

Member Avatar for JamesCherrill
0
96
Member Avatar for divinity02

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

Member Avatar for Stephen_8
0
148
Member Avatar for altjen

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 …

Member Avatar for altjen
0
253
Member Avatar for Saboor880

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 …

Member Avatar for stultuske
0
353
Member Avatar for Saboor880

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.

Member Avatar for stultuske
0
94
Member Avatar for kings400

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 …

Member Avatar for stultuske
0
247
Member Avatar for altjen

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[] …

Member Avatar for altjen
0
192
Member Avatar for divinity02

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.

Member Avatar for JamesCherrill
0
191
Member Avatar for altjen

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; …

Member Avatar for jwenting
0
248
Member Avatar for Alex_33

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 …

Member Avatar for stultuske
0
97
Member Avatar for happygeek

So I was recently at the big Motorola launch event which spanned New York City, Mexico City, Sao Paulo and London where I was part of the media herd waiting to see exactly what new handsets were about to be revealed. The answer came in triplicate: the Moto X Style, …

1
937
Member Avatar for Parvathiapril8

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..

Member Avatar for JamesCherrill
0
242
Member Avatar for achava

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?

Member Avatar for achava
0
218
Member Avatar for Munazza_1

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 …

Member Avatar for JamesCherrill
0
2K
Member Avatar for altjen

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. …

Member Avatar for stultuske
0
145
Member Avatar for hwoarang69

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 …

Member Avatar for jwenting
0
2K
Member Avatar for Saboor880

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 …

Member Avatar for JamesCherrill
0
281
Member Avatar for Saboor880

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 …

Member Avatar for JamesCherrill
0
193
Member Avatar for Charles_12

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 …

Member Avatar for rubberman
0
356
Member Avatar for അരുൺ

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 …

Member Avatar for JamesCherrill
0
1K
Member Avatar for altjen

Im having ap roblem with this. ![1.JPG](/attachments/small/4/cde330e9ebb2a478c54b56e4280cf4a3.JPG "align-left") 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 …

Member Avatar for altjen
0
254
Member Avatar for hwoarang69

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 …

Member Avatar for ~s.o.s~
0
662
Member Avatar for Jhajha

**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**

Member Avatar for JamesCherrill
-1
67
Member Avatar for altjen

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 …

Member Avatar for stultuske
0
170
Member Avatar for Vansh_2

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 …

Member Avatar for Karan_8
0
540
Member Avatar for altjen

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 …

Member Avatar for JamesCherrill
0
249
Member Avatar for hwoarang69

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 …

Member Avatar for hwoarang69
0
923
Member Avatar for Kate_2

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).

Member Avatar for JamesCherrill
0
72
Member Avatar for Doogledude123

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 …

Member Avatar for JamesCherrill
0
397
Member Avatar for Andyjava

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

Member Avatar for serenagrace
0
194
Member Avatar for Aditya0025

hello..... i am new in the coding field..... and i understand the working of codes in java......but couldn't able to start.....i have to make a program of videoconferencing.....how to start coding on it.....

Member Avatar for jwenting
0
189
Member Avatar for 9ja boy

Write a java program that accept two numbers from the user and print out the following sample out first number: 7 second number: 2 the second number goes in to the first number 3 time with a remainder of 1.

Member Avatar for JamesCherrill
-1
329
Member Avatar for Doogledude123

Is this try catch block enough to ensure the process ran successfully? protected boolean attemptLaunch() { try { System.out.println("Attempting to open '" + name + "'."); //Try to open the Process new ProcessBuilder(path).start(); return true; } catch (IOException e) { System.out.println("Opening failed. Will retry during next Iteration."); return false; } …

Member Avatar for jwenting
0
288
Member Avatar for mike chibundi

Am coding a college council voting system for my school in netbeans and mysql saver. i have populated jtables containing cadidates (jtable1 for president, jtable2 for vice president etc) and i have put a jbutton so that after sellecting candidents of choice one from each jtable, you click the jbutton …

Member Avatar for JamesCherrill
0
338
Member Avatar for Jagdeep_1

I am using eclipse 4.4 luna, where i created the web application project as my project is to be deployed on app engine. So when i try to run the project, there is no 'run on server' option to run the project on Tomcat. Please help me, am stuck on …

Member Avatar for Jagdeep_1
0
267
Member Avatar for 47pirates

I'm trying to give access to client computer from my server and also tryin to revoke the granted access... the grant is successful but the revoking is not working please help. hms is the satabase that i want to give access to my clients.. my code try { Connection con …

Member Avatar for stultuske
0
1K
Member Avatar for altjen

Im using NetBeans to create a data entry software for a friend. when I save a data, it create a folder in specified location, and the name of that folder will be different from each other for example. ![1.JPG](/attachments/large/4/e1b8ccbadaaab2f4ef21954288e53b40.JPG "align-center") it pick the Date,Invoice Number, Subject name, and create the …

Member Avatar for altjen
0
274
Member Avatar for liphoso

Please help me with how i may receive an sms to my java application using ozeki. I have used sample code that i got from http://www.ozekisms.com/index.php?owpn=584 , I used that sample code and was able to send sms. Using the same code how may i receive an sms so that …

0
124
Member Avatar for Justin_16

package Agents; import java.io.IOException; import java.io.PrintWriter; import java.sql.Connection; import java.sql.DriverManager; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet(name = "InsertAgents", urlPatterns = {"/InsertAgents"}) public class InsertAgents extends HttpServlet { protected void doPOST(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); try (PrintWriter out = response.getWriter()) { /* …

Member Avatar for jwenting
0
293
Member Avatar for centenond

Im having trouble making the enemy walking intelligence, what road to take to reach the target. So even though i have try this for 3 days, i have no clue what to do now. Say a enemy have a target. and the enemy should aproach it. but i want the …

Member Avatar for Schol-R-LEA
0
172
Member Avatar for Doogledude123

So this is the first time using a Spring Layout and I gotta say, it honestly seems like a very nice Layout to use, but I can't quite seem to get it working the way I want it to. Let me explain: I have a JList which should be inset …

Member Avatar for JamesCherrill
0
309
Member Avatar for Doogledude123

I need a boolean to be stored with a String (or possibly a Path, not sure which one I want to use yet). I thought about using a Map, so I did some looking around and found out that LinkedHashMaps are the only type of Map that stay in Order …

Member Avatar for Slavi
0
305
Member Avatar for Bijiann

I am doing program in java .I have designed a jsp page which has 3 drop downlist's...country,state and district.I want to display the values in drop down list state when a country is selected...(for eg:-if india is selected,drop down list state must have only the name of states in india).In …

Member Avatar for edgar222
0
6K
Member Avatar for edgar222

how can I select project from dropdown then execute query catching the value of the project selected I have the follow code using AJAX and JSP pages admin.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ page import="java.sql.*"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; …

0
164
Member Avatar for Mr.M

Hi Dw. I have a question of how can one detect a program attempting execute/run and also most importantly how to allow/deny programs to execute/run. I'm sure we all have came across with UAC where it ask you to allow or deny that program from running, normally this for elevating …

Member Avatar for Mr.M
0
112
Member Avatar for ilovearsenal

i copied eclipse and its files of code into a new comp. i installed the latest version of java and went into eclipse. i ran the porgram and the code that worked just fine on my previous computer compiled but the applet was blank and it said "start: applet not …

Member Avatar for stultuske
0
144
Member Avatar for 100hil

No working in jsp through tomcat...the resource are not fullfilled...and no output folder ..how to solve error

Member Avatar for stultuske
0
55
Member Avatar for Catarino

public class Test { public static int f1( int m1 ) { return ( m1 + 1 ); } public static double f1( double m1 ) { return ( m1 * m1 ); } public static void main( String[] arg ) { double x1, x3; x1 = 2.0; x2 = …

Member Avatar for rubberman
0
164
Member Avatar for Sayam_1

I am little confused about @Repository in spring.does it define any class? suppose i've done @Repository("TryDao").. does it want to say class TryDao,i.e TryDao.java ??plz clear my confuse..

Member Avatar for JamesCherrill
0
74

The End.