35,617 Topics

Member Avatar for
Member Avatar for Bud4java

How do I initialize an array that has been called from a file? There will be 5 values in the array. So should my file "input.dat" have: 5 (number of values) 4 (value) 6 (value) 7 (value) 2 (value) 7 (value) Example: BufferedReader br = new BufferedReader( new FileReader("input.dat")); and …

Member Avatar for paradox814
0
109
Member Avatar for bob901

hey all when i run this code : import java.awt.Canvas; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.event.WindowEvent; import java.awt.event.WindowAdapter; import java.awt.image.BufferedImage; import java.net.URL; import javax.swing.JFrame; import javax.swing.JPanel; import javax.imageio.ImageIO; public class SpaceInvaders { public static final int WIDTH = 800; public static final int HEIGHT = 600; public SpaceInvaders() …

Member Avatar for server_crash
0
104
Member Avatar for Ghost18

I'm not sure what exactly is causing it, but there seems to be a problem with java. I cant play any java games, nor see anything in the java windows. I also cant goto some sites. My problem is a lot like JJJ's on his thread "[URL=http://www.daniweb.com/techtalkforums/showthread.php?t=18415-java]IE and Firefox Problems[/URL] …

Member Avatar for dpinol
0
166
Member Avatar for stupidenator

coming up in a week or so, I will be taking the AP Computer Science A Exam. I'm getting a little nervous about it. Has anyone ever taken this? What did you think about it? Anything in particular that I should really study up on? I have a book on …

Member Avatar for server_crash
0
276
Member Avatar for luisator

Hi everyone! I am trying to develop an application to communicate with a Microsoft Acces database. For doing that I import the java.sql package to use the DrvierManager class to get a connection. The problem seems to be the application doesnot find the java.sql package. I have the 1.4.2_08 version.. …

Member Avatar for jwenting
0
440
Member Avatar for SyLk

can someone explain to me how i can go about implementing a string from a jtextfield and storing it to a file please. I would really appreciate some sample code on this one. Thank you

Member Avatar for Phaelax
0
138
Member Avatar for nelly_1005

i have a sseacrh mode for a mobile phone and i wnat to create the results of query as options so they are selectable, so that when a user selects the option they are taken to that page how do i do this?? do i use a similar code as: …

Member Avatar for adityabakle
0
100
Member Avatar for niamul

I have a problem like this : I have an XML file containing some records and I wants them to store in a list of objects. So first I have to create objects from this XML file. But I don't know how to create object from XML file. If anyone …

Member Avatar for Black Knight
0
102
Member Avatar for nandoo

Hi, here i enclosed my coding.i want the dom objects price,qty,oselect,name,sku and upc in the html body tag so that it can be submitted into another pages. here i want each and every element in each row to be collected and sent to the next place not the last element …

0
115
Member Avatar for tenoran

Thanks for reading my post. I would like to make a maze of pacman game with Java. I just want to load the maze from txt file, "pacman.txt" ,into program and show it upon the screen with applet. Usually, maze part would not be made or read in my way, …

Member Avatar for Phaelax
0
120
Member Avatar for zaman1111

I have a SQL query: SELECT * FROM Job_Request_Record, Requester_Record WHERE Job_Request_Record.Job_Requester_ID=Requester_Reco rd.Requester_ID; if i want to call an attribute from Job_Request_Record table e.g. rs.getString("ID")is it valid? or anything else. please help. Also, is it possible to have a create view table in ms access 2003?

Member Avatar for adityabakle
0
159
Member Avatar for nelly_1005

hi guys found anotehr probem with my code, i have created a wml page which users input a search criteria, this is then apssed onto a jsp page which prints the value in teh jsp page though it doesnt print the parametr value and prints out null code is: <b><big> …

Member Avatar for adityabakle
0
157
Member Avatar for server_crash

I can't get this code to compile, and I'm really pissed....Someone please help: [Code] import java.io.*; import java.util.*; import static java.util.concurrent.TimeUnit.*; public class ScheduleTester { public static void main(String[] args) { /** Get a scheduler **/ ScheduledExecutorServer scheduler = Executors.newSingleThreadScheduledExecutor(); /** Get a handle, starting now, with a 10 second …

0
73
Member Avatar for stupidenator

Hey all, For sort of a final project, I want to build a program in Java (if it's possible) that works much like the GMail Notifier except I want to make it popup a notification if I receive a new email in my yahoo, hotmail, or google accounts. Does anybody …

Member Avatar for jwenting
0
223
Member Avatar for shak187

hi there i have some python coding which i need to convert to java can ne1 help me please email me back if you can help then i will show you the coding much apprieciated or can ne1 give me some complted java code to look at

Member Avatar for shak187
0
1K
Member Avatar for acee

Working on a problem which uses a main only to implement Selection Sort. You enter arbitrary amount of integers and when the program runs it spits out the integers in increasing order. So the output would be something like this: Enter Integers to sort: 3 > 1 > 8 > …

Member Avatar for shyammurarka
0
408
Member Avatar for sydneyrustle

hi just wondering if anyone can help me out. i need to create a loop to display 50 roll of two dice?? i keep getting an infinate loop and i don't know how to limit it to 50.....

Member Avatar for sydneyrustle
0
154
Member Avatar for paradox814

I am in the process of learning JSP and my question is how do I check to see if a variable exists? The equivalent of this in php would be [php]if (isset($_POST['someVar']))[/php] or [php]if (isset($_GET['someVar']))[/php] any and all help would be appreciated!

Member Avatar for Comatose
0
199
Member Avatar for sensi

hi, i have been asked to create a class, TestStudentContactDetails, which uses another classes method. the first class StudentContactDetails contains a method emailAddress(String RegNumber, String Course). This method takes the Course code supplied and opens a csv file stored at c:\UserFiles. It then searches the file for an entry corresponding …

Member Avatar for Phaelax
0
240
Member Avatar for paradox814

When I open a Java Program, I want a method which returns true if the program is already running, and false otherwise. Is there a way to check for this? For example, say we open our web browser, the first time we open it, i want the method to return …

Member Avatar for tonakai
0
180
Member Avatar for Ghost

Hi Everybody, I was wondering if anybody knew if you can controll hardware with Java (open the CD drive, etc.). Thank you in advanced, C++

Member Avatar for miri
0
137
Member Avatar for SSSBoy

Anyone know how to remove an object at a particular index from an array? Im doing a Noah's Ark project for my class and Im using an Array to hold the abstract animal class and once an animal dies, I have to remove it from the list. However I can't …

Member Avatar for miri
0
235
Member Avatar for vex

What development kit is the most widely used? Which is the easiest to use? Thanks in advance

Member Avatar for miri
0
264
Member Avatar for dakkar

1) I've a form that takes some input (various fields) I must use those fields as fields of a record of a simple XML database file. Mi xml file is like: <database> <record id="1"> ...my fields... </record> <record id="2"> ...my fields... </record> ... </database> I simply must add a "new …

Member Avatar for miri
0
168
Member Avatar for Lalli10

Thing is I want a small painted ball to travel from point A to Point B combined with a timer so I can see it move. I know the mathematical side of the problem and have come up with this: int abX = pointA.getX() - bointB.getX(); // abX is the …

0
100
Member Avatar for oberle1515

I need to find the square root of the following numbers 0,2,4,6,8,10,12,14,16,18,20 I know how to use the square root method I know how to use the loop function to find it for all numbers If I just wanted to print the numbers I can do this What I cant …

Member Avatar for oberle1515
0
142
Member Avatar for ultimate_fusion

i had an eariler problem and posted it here [url]http://www.daniweb.com/techtalkforums/thread22426.html[/url] I have to read a file in format char, int, string, string string(but i dont know how many strings(words are on the end). I can get the char and int(the code is on the link above) and one strings(word) but …

Member Avatar for paradox814
0
94
Member Avatar for Ghost

Hi Everybody, I was wondering if there was a way to take a string in a java project and put it in the username field (like the field on [url]http://www.inquiryBio.com/WEBPROTECT-job.htm[/url] ) of another program. I think you may have to access another class somewhere else.Just so you know... I'm doing …

Member Avatar for paradox814
0
232
Member Avatar for server_crash

This is kind of a weird senario. This question was at the java state championship I was at a few weeks ago. Here was the question: Which type of class cannot be instantiated: abstract static (choices I can't remember..they were wrong) Would both abstract and static be correct answers? I've …

Member Avatar for server_crash
0
1K
Member Avatar for dakkar

I've a problem with some code, this is the "core" of the code: [CODE] File xmldocFile = new File(xmlFile); File schemaFile = new File(xsdFile); try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setValidating(true); SchemaFactory sf = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); Schema mySchema = sf.newSchema(schemaFile); dbf.setSchema(mySchema); DocumentBuilder db = dbf.newDocumentBuilder(); ErrorChecker errors = new ErrorChecker(); db.setErrorHandler(errors); …

-1
76

The End.