32,199 Topics

Member Avatar for
Member Avatar for vedmack

I have an Xml file from which i want to delete some different node, im doing it by using the .removeChild method, and it works just fine, the problem is that after im doing so , i getting empty line instead of the deleted node (it does not affect the …

0
64
Member Avatar for kim2_0016
Member Avatar for stultuske
0
53
Member Avatar for eranga262154

Hi all, I want to dispose a JFrame using a click-event. So I simply do this on Netbens. [CODE] private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); } [/CODE] But it not work. Do you have any idea. I just want to dispose all the …

Member Avatar for eranga262154
0
143
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
63
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
518
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
113
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
110
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
81
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
48
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
137
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
132
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
154
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
107
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
48
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
180
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
145
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
93
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
157
Member Avatar for virubudy4u
Member Avatar for bugmenot
0
96
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
151
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
571
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
266
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
41
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
213
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
137
Member Avatar for Zork'nPalls
Member Avatar for Zork'nPalls
0
93
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
154
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
103
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
192

The End.