36,051 Topics

Member Avatar for
Member Avatar for eleonora

Hello, I want to modify a java client/server game as to load the map from an xml and then validate against the dtd. Is it okay to do something like that? [CODE=java] public void parseXML(){ try{ DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); Document xmlDocument = dBuilder.parse(new FileInputStream("map.xml")); DOMSource …

0
66
Member Avatar for torbecire

I am trying to make a calculator. It requires I use a string Tokenizer. I have done so fine with the numbers but can't figure out how to put the & and / in there. The input is supposed to be as follows These are improper fractions whole & numerator …

Member Avatar for torbecire
0
522
Member Avatar for curt22

Hi everyone, I'm having trouble with this code. It compiles fine, but clicking the menu item I just added the actionlistener to doesn't work. I'm new to java and I can't figure it out. [CODE]/* * NewJFrame.java * * Created on March 10, 2008, 2:47 PM */ package javaapplication5; import …

Member Avatar for curt22
0
116
Member Avatar for fufu123

the program is supposed to enter type of a car,enter arrival hr.enter arrival min,exit hr,exit min,then it supposed to print type of the car,enter time and exit time in military style and then the charges... i dont know what am i doing wrong that its not doing that any advices …

Member Avatar for Ezzaral
0
114
Member Avatar for matthewc

[CODE]try { fileStream = new FileInputStream(fileName); boolean questionnaireNumExists = readLines(fileStream, questionnaireNum); if (!questionnaireNumExists) { dataLine += sQuestionnaireNum; dataLine += ","; } else System.out.println("The questionnaire number you have entered already exists," + " re-enter a number"); } catch (Exception e) { System.err.println(e.toString()); } [/CODE] The compiler skips the try{} and goes …

Member Avatar for Ezzaral
0
85
Member Avatar for Javaman31

I am running program through JGrasp and it compiles but the run stalls would someone mind telling me what is wrong? [code] import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; import java.io.*; import java.util.Random; public class PennyPitch { public static void main(String[] args) { int score = 0; int played …

0
50
Member Avatar for Parsu7

Is it necessary to declare an inner class private?If it is then plz specify the reason why is it necessary to declare an inner class private?

Member Avatar for jwenting
0
139
Member Avatar for devilgod

ive created a program using the actionperformedmethod...even though the panel and all other things r coming in the output nothing is happening when i perform an action.... here is the program...... [code] import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.awt.Color.*; public class goku extends JFrame implements ActionListener { int clicked=0; …

Member Avatar for new_2_java
0
156
Member Avatar for pavya133

there is problem in java program. I want to send object of a particular class as a parameter to a method in other class dynamically. e.g Suppose there is method named 'insert' in a class 'Daobase' and parameter to this method is object of any class that is i want …

Member Avatar for masijade
0
158
Member Avatar for yellowflashboy

Hey, guys. i desperately need some help designing a university project. the project is called Grocery shop. it has a product class which will hold all the products description and set thresholds finally it will need a stock management class which will allow the user to add, remove and edit …

Member Avatar for yellowflashboy
0
110
Member Avatar for vinithktp

Hi all, I doing a CMS project. I am using a rich text editor. Please guide me [B]how to upload images from rte to database[/B]. Thanking you.......

0
66
Member Avatar for michrods

We have our present site running in JSP([url]www.nio.org)[/url]. [B]The only thing that is missing is groups.[/B] So we want to add these features to it. Let us consider the situation. There are students at the lowest level, the teachers at the next higher level. And the principal at the highest …

Member Avatar for peter_budo
0
83
Member Avatar for the juice

hey i am doing an assignment and it is to create a multithreaded bubble sort but i am having problems initialising and assigning jobs to the threads. i have included the classes and the errors i am getting and was wondering if someone could tell me what is going wrong. …

Member Avatar for the juice
0
2K
Member Avatar for jamesbien

Hello, I need a small application written to read (ASCII) data off of a com port that is in use by another application. I need to then parse that data, and send it off to the default windows (XP) printer with some minimal formatting to print out data (and page …

0
50
Member Avatar for mathisfunwith

this is a program that the user is suppose to select a computation from a menu, the menu calls the function. and then the output is displayed in a nice java window. I think most of the coding is correct but i am having problems with the switch statement at …

Member Avatar for darkagn
0
183
Member Avatar for CaffeineCoder

I've been playing (more like struggling) with a few ways to illustrate an explosion for a Fireworks display in an application. One of my reference books dealing with Game Programming had a very nice solution, where the "explosion" is a progression of images. One problem: it relies or depends on …

Member Avatar for CaffeineCoder
0
148
Member Avatar for RMartins

I´m a begginer in java and i would like to know how can i create graphs like: y=ax+b for example thanks

Member Avatar for RMartins
0
95
Member Avatar for chris5126

Hi guys, prob a really easy one im tryin to install java on debian and it keeps on failing. The output from the trying to make a .deb package and uname -r is below. any ideas anyone. [code] uname -r gives: Linux debianlaptop 2.6.18-6-686 #1 SMP Sun Feb 10 22:11:31 …

Member Avatar for jbennet
0
160
Member Avatar for virubudy4u
Member Avatar for bugmenot
0
101
Member Avatar for madhusamala

Actually i am doing a ssc project. The student will enter his roll no in a web page which is designed by html. HIs marks subject wise have to be displayed wth the total marks . this will be done by using servlets and my html code is [code] 1, …

Member Avatar for ~s.o.s~
0
155
Member Avatar for Techboy52

I have a Calculator program below that I wrote. I need it to write an exception handler that deals with non-numeric operands. I know the exception error i need is Number Format Exception but I am having a hard time with my try and catch block so I took it …

Member Avatar for ~s.o.s~
0
618
Member Avatar for Shveetis

I am trying to write a code for sending a mail in JAVA.. And I am getting the error [code] javax.mail.MessagingException: Could not connect to SMTP host: mail.yahoo.com, port: 25; [/code] What can my mistake possibly be..?? Please help me find my mistake..

Member Avatar for Shveetis
0
268
Member Avatar for Ankita B

Hi,I want to develop a webpage (page1.jsp) that has 2 textboxes,user id and user name,and abutton find user.when i click on find user button ,all the user id and names must be displayed on next page(page2.jsp) in one list.something like this... USER ID USER NAME 123 george 456 Emily 789 …

Member Avatar for ~s.o.s~
0
78
Member Avatar for maulee

I am sending an mail using mail api..but the mail goes into the recepient's BULK folder..is it any way to stop it from going into the bulk folder?

Member Avatar for ~s.o.s~
0
52
Member Avatar for john1000

does anyone know how to make a similar program like IP Shifter in java...[url]www.zqware.com/ipshifter.htm?[/url]

0
44
Member Avatar for bops

Hello, for a University assignment I am attempting to use a brute force search to generate all possible combinations of a list of numbers. This is only a small part of what I must do. I realise that a Brute Force Search would be extremely computationally expensive but it is …

Member Avatar for shinnxennosagga
0
217
Member Avatar for Cudmore

SO, I'm playing around with an idea. I'm trying to convert primitives to and from a char array for file logging. I've got all the details worked out, but I don't understand something.. Take the following case, for example: [CODE]public static byte[] ToByta (short data) { return new byte[]{ (byte)(data …

Member Avatar for Zork'nPalls
0
142
Member Avatar for Zork'nPalls
Member Avatar for Zork'nPalls
0
98
Member Avatar for mickinator

Hi all, ain't been here in a while, busy busy busy with college... I have an assignment on threads for Operating Systems, I can't actually see how it relates to OS but it is thread based, I haven't worked with threads before, but I have it finished to the best …

Member Avatar for Zork'nPalls
0
157
Member Avatar for codefreak2.0

Greetings everyone... :) I'm new to the DaniWeb community & it looks like a great place to learn from others. As a programmer with very little experience, other than textbooks & class, I'm looking for help in learning to code real world problems effectively. I'm currently reading: "Teach Yourself Java …

Member Avatar for codefreak2.0
0
104
Member Avatar for Robtyketto

Greetings, I have 2 JSP files and a bean which are collectively used to delete a record from an access database. They run without errors, however the only value from the form that is required, that is passed as a parameter to the bean is Null (debugging showed value is …

0
89
Member Avatar for Derek1974

I have a Dell Dimension 4500, About a year ago I decided to open the hinged case to clean some of the dust out. After she was all cleaned out I went to start her up. Well, she would start, but would not boot into windows. Just a yellow light …

Member Avatar for caperjack
0
126
Member Avatar for rickster11

If anyone has a minute, I could use some help. Been working on this program all day. I know it's hard trying to understand someone's code and logic...but I'm hoping there is an easy solution here. My program needs to be able to read and write files at the push …

Member Avatar for rickster11
0
194
Member Avatar for evaristo

Does anybody came across an application architecture diagram(uml Sequence or Collaboration) lately? i mean, there are lots of examples on the books of micro-level application type of solutions, but the broad picture, the framework, in a simplified, yet understandable manner ? the kind of diagram for a GUI app that …

0
57
Member Avatar for nikk

Hello friends, I want to display the date retrieved from database on my JSP in dd/mm/yyyy format. However, if i directly use - result.getString(col_num) it gives me - yyy/mm/dd hh:mim:sec:millisecs Can you please tell me, how to convert retrieved date. It won't be possible for me to use - select …

Member Avatar for jinalh
0
289
Member Avatar for ajithraj

haii... pls help me to get the cursor position in javascript....from textArea thankzzzzzzz

Member Avatar for ajithraj
0
54
Member Avatar for jinalh

hi all, m facing some problem when m trying to use calendar in my jsp with spring:bind tags. like below::: <input name="popca1" type="button" tabindex="4" value="..." class="dateButton" onClick="if(this.blur)this.blur();gfPop.fDemoPopDepart(this.form.dc1,this.form.batch_date);"> & 1 hidden variable :: <input name="dc1" type="hidden" value="06/08/2001"> with this in html tag after body tag i include ::: <iframe width=174 height=189 …

Member Avatar for jasimp
0
92
Member Avatar for abhi287

Hi all On my jsp page i m having two tables.. first table have 14 rows which takes input type=text. and my second table is having 9 rows which also takes 9 inputs. Thus total 23 inputs on a form.. Now when the user click submit, i want to check …

Member Avatar for javaAddict
0
93
Member Avatar for Ankita B

thispage.jsp displays user id and name in a table format with radiobutton attached to each row.... [CODE]while(enum.hasMoreElements()) { String upid = (String)enum.nextElement(); String upname = (String)enum.nextElement(); %> <tr> <td> <input type="radio" name="idradio" selected="false" value="<%= upid %>" /> </td> <td> <% out.println(upid);%> </td> <td> <%out.println(upname);%> </td> </tr> <%} %>[/CODE] nextpage.jsp needs …

Member Avatar for Ankita B
0
864
Member Avatar for newbie_xml

Hi All, i want to use statement like exitvalue=process.waitfor(); my program terminates once i execute the process and so no value is returned by process.waitfor();Nothing that cumes afetr this stmt is executed. Can anyone tell me how to come out of process.waitfor. any pointers for this are also appreciated Thanks …

0
82
Member Avatar for Noliving

I'm not seeing my bracket problem at all! [code=java]import java.util.*; /** A class to represent an ordered list. The data is stored in a linked * list data field. * @author Koffman & Wolfgang */ public class OrderedList<E extends Comparable<E>> implements Iterable<E> { /** A linked list to contain the …

Member Avatar for Noliving
0
251
Member Avatar for rickster11

I really don't understand what I'm doing wrong. I've made windows before..and never have had this problem. The code complies fine, but when I run it I get this message.. java.lang.NoClassDefFoundError: smartMonster Exception in thread "main" right now all I want is a window to pop up with a button. …

Member Avatar for jwenting
0
77
Member Avatar for tactfulsaint

Hello Everyone. I Need a code that can enable me perfom the following task as an administrator i develop a code that i can use to limit other users from perfoming certain task like deleting,inserting updating, the only previledge i can grant is just to submit to the database but …

Member Avatar for orko
0
117
Member Avatar for Noliving

Ok this is my first time doing iterators in java so bear with. Here is what my assignment is asking for: You should add the following methods to the code provided by the authors: public ListIterator <E> iterator() The type of iterator is actually ListIterator because this can be easily …

Member Avatar for Noliving
0
84
Member Avatar for beatlea

Hello, I am trying to write my first ever assignment in Java and am straggling with it. I have a superclass LivingThing and two subclasses, Monster and Human. Both subclasses have an attribute 'strength', but the maximum value of it is different for each of them. In my superclass I …

Member Avatar for beatlea
0
110
Member Avatar for erementarz

Hi, I'm experiencing an OutofMemoryError exception while recursing through a tree with a large number of branches (30) but relatively small depth (5). Here's the basic idea of the code: I start growing the tree using a depth-first method, and after I reach the leaf node, I assign a value …

Member Avatar for Ezzaral
0
115
Member Avatar for drsmith

I am looking for input on the best books/resources for learning Java and JavaScript. The students will be familar with programming in general but will be new to Java/JS. Thanks...DS

Member Avatar for midimatt
0
49
Member Avatar for nikk

Can you please tell me how to expire a session after a fixed interval of time.(i.e if the browser is inactive for some time - say, 5 mins) Once the session expires, and if user tries to access the page, then he is prompted for login again, am i right? …

Member Avatar for nikk
0
236
Member Avatar for hkraskian
Member Avatar for masijade
0
112
Member Avatar for cheenu78

hi all, I am planning to take up sun certified java developer exam(SCJD). Can any one help me with the topic that you have got as the project. This would help me as I am planning to take scjd up only after 3 months. I want to prepare myself for …

Member Avatar for jasimp
0
251

The End.