31,001 Topics

Member Avatar for
Member Avatar for Samama

So im working on a project where im supposed to dynamically load the contents of a .csv file into the database.I have been hard coding the path of the file till now like * inserted = insertFromFile("C:/Users/Student/Desktop/Book1.csv",connection, "customer"); * however now i have to read multiple files from a folder …

Member Avatar for DavidKroukamp
0
94
Member Avatar for polarbear125

I have this Die class, which I am working on for a game called Craps. My old method works, but I wanted to try to use dice with a higher number than 6. I can get the program to accept my user input, but how can I get it to …

Member Avatar for DavidKroukamp
0
233
Member Avatar for Sarama2030

Hi guys Im developing this java application and i have the following hurdles: a) I would like to develop an installer for all platforms(including windows,linux and Mac). b)Can someone please illustrate clearly how to connect to a mysql database in java after having downloaded the driver(connector/j) and having imported all …

Member Avatar for DavidKroukamp
0
235
Member Avatar for ForceStr

Hello, I need help with my app. It works great, but when I build the project, the program doesn't want to connect to database (when Netbeans is off), it writes error: java.net.ConnectException: Error connecting to server localhost on port 1527 with message Connecton refused. I have derbyclient.jar imported to libraries, …

Member Avatar for DavidKroukamp
0
110
Member Avatar for c.pentasuglia

If i have a jar file on a server, and i have a program that needs to use the file as a dependency on the server also. How could i patch up the code to build without the dependecy before i deploy it. I know it can use the dependency …

Member Avatar for DavidKroukamp
0
237
Member Avatar for resiak

i'm an IT student. Our Instructor gave us assignment to edit and delete txt file. how to edit and delete text file in java? can you give me the code ?

Member Avatar for DavidKroukamp
0
224
Member Avatar for rdhiravani

Hi, I have a swing application which works on CSV file. It reads full file line by line, computes some required statistics and shows output. The Upper part of output screen shows each record from file in that order in JTable, whereas lower part shows statistics computed based on that …

Member Avatar for JamesCherrill
0
169
Member Avatar for rajesh1158

public class Twisty { { index = 1; } //need clarification here int index; public static void main(String[] args) { new Twisty().go(); } void go() { int [][] dd = {{9,8,7}, {6,5,4}, {3,2,1,0}}; System.out.println(dd[index++][index++]); } } In the above code, inside the instance initialization code, index is used. But it …

Member Avatar for JamesCherrill
0
146
Member Avatar for Hektik1

Hey guys, I am trying to make a program that allows you to input music artist into an array. The array row length is dependent upon a number entered by the user. There are only three column. I am having trouble with a line inside the for loop printing twice …

Member Avatar for Hektik1
0
176
Member Avatar for baseballer

I am trying to write a program that will allow the user to search for a first or last name within a document full of people's names, and respond with the position of that name within the .txt file. What I have right now keeps returning -1 for the position …

Member Avatar for NormR1
0
218
Member Avatar for ct_hunny
Member Avatar for javaprog200

Hello, The following program has a JFrame which contains an image, JTextArea and and a textfield. How can I display the image inside the text area? I will be grateful for any help! Thank you! import javax.swing.*; import java.awt.*; import javax.imageio.ImageIO; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.awt.event.*; public …

Member Avatar for DavidKroukamp
0
5K
Member Avatar for nova37

my java scripting is week ..... so i want to ask that i have alexa traffic graphs links and i want to Load them with javascript when use click desire tab ( see image) so how to do that . [ http://i1102.photobucket.com/albums/g453/darkc99/sss.png](image) <!--Daily Traffic Rank Trend--> <script language="JavaScript" type="text/javascript" src="http://xsltcache.alexa.com/traffic_graph/js/g/b/6m?&amp;u=http%3A%2F%2Fwww.yoursite.com+++++"></script> …

0
59
Member Avatar for lj81

Hi I'm currently writing a program which applies collision detection to balls on the screen. My code works to a certain extent (the balls collide however they do not rebound away from each other) but it is not written efficiently. Here is the code that partially works: private void checkForCollision(Ball …

Member Avatar for lj81
0
166
Member Avatar for <HHH>

I have an ArrayList Contain Strings as follow 1, 200, 2 , 434 , 3 , 400 , 4 , 500 ............................... and so on how i can remove the number 1,2,3,4 i tried the followinh code but its not worrking for (int i=0;i<content.Size();i++){ if(i%2== 0 ) // if the …

Member Avatar for JamesCherrill
0
125
Member Avatar for c.pentasuglia

So i have a java program running as a lib on a server. I need to just simply run a method within that library. In order to do so through J2EE, i need to get a call from a JSP -> EJB ->ResourceAdapter->Method. So i have the Reasource Adapter and …

0
141
Member Avatar for Kitt3nkat

I am trying to create a 2d table that asks for user input to create table size, adds all the numbers across each row, and creates the next row by multiplying by the first row. Here's what I have and it's now giving me an "Exception in thread "main" java.lang.NullPointerException" …

Member Avatar for NormR1
0
880
Member Avatar for robin99

can anyone show me the point to get the tutorial on how to print using shared printer in java (windows os) ? thank you all

Member Avatar for robin99
0
543
Member Avatar for polarbear125

I have the following program, and I want to print the appropriate return statement for the numbers given. I am currently getting the error "cannot find symbol variable result, lines 18 & 19"... how do I get it to work, though? I've tried a few different ways, and this is …

Member Avatar for polarbear125
0
181
Member Avatar for koricha

i get an error "org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 18" i think my exception code is wrong. i don't know how to return an empty string when the user doesn't enter any number and clicks "continue". any suggestions <%@ page import="java.io.*"%><%@ page import="java.util.*"%><?xml version="1.0" encoding="UTF-8"?> …

Member Avatar for thines01
0
186
Member Avatar for sdr001

Hey everyone, I am having some trouble parsing a string in java. I get a string from a databse, then I want to put it into a String Array to access two elements in the array (x and y positions). I think my problem is when I try to split …

Member Avatar for NormR1
0
215
Member Avatar for Sgt. Pepper

Hello, My assignment in class is to write a notepad program in java, using only the .io and .awt extensions (I believe that's what they're called). Now, I've got every part of the program working, except the save and saveAs functions. I've spent roughly 5 hours looking for and trying …

Member Avatar for JamesCherrill
0
777
Member Avatar for sarrrry92

Never mind my last post(I don't know how to detete) How to do the main? Write a program that has an array of 5 Strings, and determines which ones are palindromes (letter-case does not matter) . Your code will be written in one class Palindrome.java and has a main() method. …

Member Avatar for joankim
0
148
Member Avatar for brandon66

Hey guys im new to java in the process of learning how would i go buy adding exceptions to my code with a try/catch when i divide by zero or enter a word instead of and integer. package errorapp; /** * * @author Brandon */ import javax.swing.JOptionPane; import java.util.InputMismatchException; public …

Member Avatar for NormR1
0
199
Member Avatar for ITOzann

Hello guys, I've been trying to finish a project. But I seem to be stuck. I'm suppose to get the following output: [1:18:10, 2:33:10, 3:21:10] Remove customer:1:18:10 Remove customer:2:33:10 Remove customer:3:21:10 [Cashier:1001:0-0:Customer:null, Cashier:1002:0-0:Customer:null, Cashier:1003:0- 0:Customer:null, Cashier:1004:0-0:Customer:null] Remove free cashier:Cashier:1001:0-0:Customer:null Remove free cashier:Cashier:1002:0-0:Customer:null Remove free cashier:Cashier:1003:0-0:Customer:null Remove free cashier:Cashier:1004:0-0:Customer:null [Cashier:1001:13-31:Customer:1:18:10, Cashier:1002:13-46:Customer:2:33:10, …

Member Avatar for ITOzann
0
375
Member Avatar for koricha

i am trying to get the sum of 2 number.. it should give me a message if the sum is correct. i get an error "21 in the jsp file: /index.jsp Incompatible operand types String and int" .any suggestions whats wrong with the program. <%@ page import="java.io.*"%><%@ page import="java.util.*"%><?xml version="1.0" …

Member Avatar for IIM
0
2K
Member Avatar for lena1990

hi i want to move from one applet that is displayed in html to another applet that is also displayed in html how i can do that thanks for help

Member Avatar for NormR1
0
89
Member Avatar for DavidKroukamp

Hmm i really like what applications like Windows Media Player and VLC player can do, and by this i mean: you know when you are watching a movie or listening to music and you minimize the window? Well if you hover the taskbar icon of the minized window with your …

0
188
Member Avatar for tendaimare

I am going through some tutorials in java and I would like to do my first insert into an SQL express database using java .I saw some tutorial recomending jdbc insert. I would like to know which is the best and most reccomended way to carry out an insert into …

Member Avatar for tendaimare
0
158
Member Avatar for UnhingedToker

I have an image consisting of lot of different frames. There are a lot of transparent pixels in the frames. I have to split the image into individual frames and iterate over the pixel data in an input image/buffer and copy out rectangular regions containing non-transparent pixel data into individual …

Member Avatar for JamesCherrill
0
166

The End.