32,204 Topics

Member Avatar for
Member Avatar for ubi_ct83

Hi, i need help on updating data in mysql using JDBC since im using java.i want to send data from arraylist and it seems and error when i run it.below is my code for update. [CODE] private void update(ArrayList<String> list, int uid) { try { Connection con=null; Class.forName ("com.mysql.jdbc.Driver").newInstance (); …

Member Avatar for JamesCherrill
0
663
Member Avatar for hwoarang69

i need help creating enemy. i want enemy to move closer to player and enemy can only move left or right; here is my enemy class public class Enemy extends BasicGameState { Animation enemy; Animation e_movingRIGHT; Animation e_movingLEFT; int[] duration = {200, 200}; //how fast animation change double speed = …

Member Avatar for NormR1
0
184
Member Avatar for GlenRogers

I have a TreeeMap that i need to wite to file. I tried this: try { File file = new File("reboot_customer_details"); FileOutputStream f = new FileOutputStream(file); ObjectOutputStream s = new ObjectOutputStream(f); s.writeObject(customerDetails);//customerDetails is the map i need to save s.close(); } catch(Exception ex) { gui.results.setText("Error: " + ex); } When …

Member Avatar for JamesCherrill
0
185
Member Avatar for GlenRogers

Hi, can anyone tell me how to make the text a user types into a JTextfield appear in uppercase regardless if caps is on or not? Thanks Glen..

Member Avatar for GlenRogers
0
257
Member Avatar for raviaaaa

HI Could yu please tell me how to get previous values from current iteration in the below example : public void parseDtoCollection(Collection dtos) contains list of dtos in private AssetClassVersion createNewAssetClassVersion(AssetDTO dto) method i am iterating but i want to get to get previous itearation values in current iteration if …

Member Avatar for JamesCherrill
0
362
Member Avatar for Majestics

Can some one provide me an example to call dll from java? I learning some thing about JNI , also linkage with c++ but doesnt found any cool stuff on c# and java... I want a free solution. Thanx in advance.

Member Avatar for Majestics
0
221
Member Avatar for london-G

Hello, I would like to retrieve the data from one of my database table. I have read many stuff about it and found out that I need to create a table model which is quite confusing to me. Basically my table consists of customer information. What is the best way …

Member Avatar for nikolaos
0
1K
Member Avatar for shasha56959

hello,i have a problem in my math project. my project is to write a program that read set of element and its relation. the input data will be from text file.(Set<space>Relation). {1,2,3} {(1,1),(2,2),(3,3),(1,2),(1,3),(2,3)} i have no problem reading text file into the program but im stuck when i want to …

Member Avatar for NormR1
0
153
Member Avatar for mits28

I am trying to learn JavaMail API.i am working on this.i have search much from google..i know for hosting mails, mail server is require and Apache james is a open source server.i have downloaded that.but i am not able to configure that.i dont understand how actualy javamail work with James.I …

Member Avatar for godzab
0
177
Member Avatar for trishtren

Hey, Iv been working a lot with binary files recently and i am currently stuck trying to save a string to a file. The problem is i do not want the literal string value of "010100000000000100010011000000000001000100110" to be saved to the file I want the above binary string to be …

Member Avatar for NormR1
0
1K
Member Avatar for speakon

Hello! I am starting a small text based game, I have created my set and get methods for my player class: import java.util.*; public class player extends main{ /* * Player attributes: * Name * Weight * Morale * Money */ //PLAYER ATTRIBUTES private String name; private int weight; private …

Member Avatar for trishtren
0
286
Member Avatar for sirlink99

I am making a game, and I am wondering how to make an image from a graphics object. I have tiles stored in an xml file. I then read from this file to make the level, however I would like to have a thumbnail for each level. This is why …

Member Avatar for richieking
0
79
Member Avatar for cvanithakpm

main() is a static method and is part of class. Then how is it that main can access instance members?

Member Avatar for richieking
0
129
Member Avatar for anilchuthur

i havae problem java connection with sql server 2005 in windows authentication mode my code is as follows Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); Connection connection = DriverManager .getConnection("jdbc:sqlserver://localhost:1433;database=dbName;integratedSecurity=true;");

Member Avatar for anilchuthur
0
326
Member Avatar for raviaaaa

HI All i am new to java jdk 1.4 and tomcat 4 my requirement is id desc name firstname lastname 1 hi ravi m last 1 hi ravi m middle 1 hi ravi m mapp 2 hi kiran ha hey 3 hi vinoth hello yes id is ----id desc name …

Member Avatar for JamesCherrill
0
409
Member Avatar for jackmaverick1

During the process of creating my latest game, I've come across the problem of collisions. In the last few games I've made, I've used a system of collision detection that relyed on two rectangle's methods. This seems to work, but doesn't provide a method for dissallowing an entity entry into …

Member Avatar for jackmaverick1
0
212
Member Avatar for warpstar

Can someone explain the code below? Is .next an operator in java that pushes the pointer to the next node in the linked list? Node E < -- type node? public E dequeue ( ) throws EmptyQueueException { if (isEmpty ( )) { throw new EmptyQueueException (”Queue under flow”) ; …

Member Avatar for warpstar
0
143
Member Avatar for DanCuster

Hello everyone, I am building a tic-tac-toe game for my final and everything is going smoothly except for one problem. The names I ask the user to enter at the beginning of the game, a replaced with null when the messagebox that shows who won appears. Here is the code, …

Member Avatar for JamesCherrill
0
639
Member Avatar for nikolaos

How can i add some space between these four components and the JFrame window? ![jframe_view](/attachments/large/0/jframe_view.jpg "jframe_view")

Member Avatar for nikolaos
1
18K
Member Avatar for rupes0610

I have a tab delimited text file with text like this: Wed Jun 13 01:00:19 2012 | error | client xx.xxx.xxx.x | rdy 784 bsy 16 The pipe | signifies that the tab delimiter. I need to convert this into a CSV file using Java. I also need to split …

Member Avatar for Ezzaral
0
143
Member Avatar for malsmit2014

package furniture; import java.io.*; import java.util.*; public class Program3 { public static void main(String[] args) { //array of 10 Furniture object references String[] furniture = new String[10]; String filename = "furnitureData.txt"; Scanner input = null; try{ input = new Scanner(new File(filename)); }//end try catch(FileNotFoundException e){ System.err.println(e); System.exit(1); }//end catch }//end …

Member Avatar for DavidKroukamp
0
296
Member Avatar for GlenRogers

I need to search a Maps keys based on user input. So in a text field the user may type "M",then hit a button marked "search" this will bring up all keys that begin with M. Mike Molly Michael Michelle Marvin If they type "Mi" it will bring up Michael …

Member Avatar for JamesCherrill
0
110
Member Avatar for hyung101

Can someone help me with a short program that calculates age, the user will input their birthday and the program displays the age..

Member Avatar for poojavb
0
3K
Member Avatar for warpstar

Hi there, I am having trouble understand how they derive these running times for the code in the image below. [http://i.imgur.com/usK9U.jpg](null) I am having trouble especally with log n running times, how are they derived? especially the bottom left slide. If someone can shed some light on this, I would …

Member Avatar for Mbot
0
150
Member Avatar for koduruabhinav

I am retrieving a value from DB. Datatype in DB:---- number(6,2). So i retrieved as decimal from db as getdouble(attrubute) So if 10 is present in DB i am getting 10.0. Is there any way to get 10 and at the same time if 10.2 is there i require as …

Member Avatar for Ezzaral
0
101
Member Avatar for GlenRogers

Hey all I need a bit of help if someone can! im writing(trying to!) a small application for a friend who owns a computer repair shop. Its a 'booking in' application. Someone brings a computer/device in and whover is on the front desk takes some details. Name, Street, Town, Postcode …

Member Avatar for GlenRogers
0
333
Member Avatar for coroll

Hi ! I am writing simple email client that uses TCP/IP sockets to interact with an SMTP server to send email messages. this is my code import java.io.*; import java.net.*; import java.util.*; import java.text.*; public class TestSendMail { public static void main(String args[]) throws IOException { Socket socket; DataInputStream dataInput; …

Member Avatar for NormR1
0
124
Member Avatar for zazizu

meter billing for company and the application must hold information 5 customer . use array and repetition structure step is :- 1) prompt user to input type of customer (residential or industrial),past meter reading, & current meter reading. 2)seperate them as either r for residential or i for industrial use …

Member Avatar for JamesCherrill
0
88
Member Avatar for enakta13
Member Avatar for pitic

I have a task to create an app that scans a 2D code (DataMatrix) with a usb scanner (set to work as a serial port), then creat a zip file from the inputstream, unzip it and get an xml. i have managed to scan the code, get the inputstream but …

Member Avatar for pitic
0
264

The End.