32,204 Topics
| |
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 (); … | |
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 = … | |
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 … | |
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.. | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
main() is a static method and is part of class. Then how is it that main can access instance members? | |
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;"); | |
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 … | |
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 … | |
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”) ; … | |
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, … | |
How can i add some space between these four components and the JFrame window? ![jframe_view](/attachments/large/0/jframe_view.jpg "jframe_view") | |
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 … | |
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 … | |
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 … | |
Can someone help me with a short program that calculates age, the user will input their birthday and the program displays the age.. | |
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 … | |
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 … | |
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 … | |
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; … | |
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 … | |
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 … |
The End.