32,199 Topics
| |
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 … | |
can you give ne some ideas on how to do this program output? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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? | |
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; … | |
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 … | |
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 … | |
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. … | |
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 … | |
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 … | |
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 … | |
I´m a begginer in java and i would like to know how can i create graphs like: y=ax+b for example thanks | |
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 … | |
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, … | |
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 … | |
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.. | |
does anyone know how to make a similar program like IP Shifter in java...[url]www.zqware.com/ipshifter.htm?[/url] | |
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 … | |
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 … | |
is it possible for me to call a static method if all I know is the class? | |
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 … | |
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 … | |
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 … |
The End.