32,204 Topics

Member Avatar for
Member Avatar for Mike1986

Hi I did a Simpletron program in GUI interface, but when I want to print the instructions in the window, it will not be as I want to. I used JGrasp to run the program and it just prints the instruction after each and not the way I wrote it …

Member Avatar for JamesCherrill
0
469
Member Avatar for noobjavacoder

ok, so i know this is stupid and probably the easiest thing in java but my brain is not working right now. so i'll ask, how do you add the numbers after you divide them in a for loop. for example: i ask a user to enter a number, the …

Member Avatar for noobjavacoder
0
162
Member Avatar for sing1006

try { File file = new File("/Users/Alex Ting/Desktop/test2/MovieList.xml"); DocumentBuilder dBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = dBuilder.parse(file); NodeList movielist = doc.getElementsByTagName("movie"); for(int i =0;i<movielist.getLength(); i++){ Node m=movielist.item(i); if(m.getNodeType()==Node.ELEMENT_NODE){ Element movie = (Element) m; String movieID = movie.getAttribute("id"); NodeList mnamelist=movie.getChildNodes(); for(int j=0;j<movielist.getLength(); j++){ Node n = mnamelist.item(j); if(n.getNodeType()==Node.ELEMENT_NODE){ Element name = (Element) …

Member Avatar for JeffGrigg
0
341
Member Avatar for sing1006

for(int i =0;i<movielist.getLength(); i++){ Node m=movielist.item(i); if(m.getNodeType()==Node.ELEMENT_NODE){ Element movie = (Element) m; String movieID = movie.getAttributes("movie id"); NodeList mnamelist=movie.getChildNodes(); for(int j=0;j<movielist.getLength(); j++){ Node n = mnamelist.item(j); if(n.getNodeType()==Node.ELEMENT_NODE){ Element name = (Element) n; //System.out.println("MovieID: "+ movie id + name.getTagName()+ ": "+ name.getTextContent()); } } } } it gave me error of …

Member Avatar for sing1006
0
226
Member Avatar for sing1006

I want to pass the string from client to server and the server will display the string. First the client enter the option 1 and the server will reply ask from the movie name. My problem is i cannot enter the name from client and send it to server and …

Member Avatar for sing1006
0
1K
Member Avatar for janetheath

Hi, I am getting this error and just can not figure out what is causing it. I have looked at code from 2 different books. I have google searched. Here is part of my program that contains the code giving me problems. I posted the program from the beginning to …

Member Avatar for JamesCherrill
0
6K
Member Avatar for Manel_1

Hi everybody; I am a beginner in the BPEL development. I need tutorials that can help me to implement the parsing of a BPEL process into graph under netbeans 6.7 (the API that should be installed etc ( I have installed the JDOM API). I will be grateful if you …

0
89
Member Avatar for idmanner

Hello, I've been working on this chat program which has a gui. Basically for now im just pressing start then connect to get a connection. Start is for the server window and if you press connect that will be the client window. I can send messages from the client to …

Member Avatar for idmanner
0
286
Member Avatar for gahhon

Based on my understanding, both are doing the same way which also kind of override the methods. Abstract method is, both childclasses are having the same methods, but different execution code. Interface is, whenever the class implement the interface class, the class must write the execution of all the methods …

Member Avatar for JamesCherrill
0
223
Member Avatar for gahhon

I have a Task class (superclass) which inherited PracticeTest class(childclass). I'd faced question regarding my pass year question. In fact, we are allowed to declared like this Task aTask = new PracticeTest(); But i wonder why we are doing this way? Thanks for advance explanation.

Member Avatar for JamesCherrill
0
205
Member Avatar for Shiladittya

I want to get all the vertices from an ARC. I have all the data (for ex : start point, end point, start angle, end angle, radius) which will used to draw an arc but my need is I have to generate all the vertices from the arc data. I …

Member Avatar for stultuske
0
210
Member Avatar for Robert_34

I keep getting this error message when I try to run ----jGRASP exec: java DomParserExample Exception in thread "main" java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:615) at DomParserExample.getIntValue(DomParserExample.java:152) at DomParserExample.getAlbum(DomParserExample.java:111) at DomParserExample.parseDocument(DomParserExample.java:89) at DomParserExample.runExample(DomParserExample.java:35) at DomParserExample.main(DomParserExample.java:177) ----jGRASP wedge2: exit code for process is 1. ----jGRASP: operation complete. Here is my code that I …

Member Avatar for JamesCherrill
0
819
Member Avatar for collin_ola

Hi! So yesterday when trying to run a program that previously ran perfectly, I received the error shown in the title and I've no idea why. Nothing that could have caused such error was changed, so I've absolutely no idea what the problem could be. Here's the code the error …

Member Avatar for stultuske
0
2K
Member Avatar for Rachy3091

Hi I'm new to this forum and to java, I have some work to do which requires that I have to write a program that reads in a list of whole numbers and that only even numbers in the range 1-100 are accepted and both 'N' and 'n' terminate the …

Member Avatar for stultuske
0
142
Member Avatar for Fayzan

Hi every one, i have been given an assignment, and i need your help in making the programme. The question is Write a program to simulate a lottery game where a set of the lottery numbers includes 6 different numbers from 1 to 49. A possible run may look e …

Member Avatar for JerrimePatient
0
217
Member Avatar for daino

Hi I'm not even sure what you call this kind of thing but I believe 'InDesign' by adobe does this to some extent. I'm looking for a HTML/CSS/Javascript editor all in one. Basically I want to be able to type my HTML/CSS/Javascript code in one screen and see the results …

Member Avatar for Tangerinejoe
0
554
Member Avatar for Bharti_1

I am trying to implement meeting scheduling algorithm. I want to randomly generate meetings and store it in a file. Then read this file in another code, create different agents who will try to schedule these meetings. My input meeting file is as follows: 1 20 25 [1 2 3 …

Member Avatar for Bharti_1
0
379
Member Avatar for Pobunjenik

Hi, so I've got this multithreaded server which correctly waits for clients and assigns them to a worker thread. From there, the client is sent an object `Packet` which contains variables `Player` and `Round` (simplified, it contains more data but these are the most important). I'm building a simple top …

Member Avatar for JamesCherrill
0
435
Member Avatar for erdie213

write a java program that reads integers only from a text file"myData.txt", square the integers and then ends the result to an output file "output.txt".the program should be able to skip text characters in the file and square only integers

Member Avatar for stultuske
-2
92
Member Avatar for nikita.chandra

hi ! Anyone can tell me how can i get the value of dynamic textbox on jsp page. If i'll use request.getParameter("elementName"); here as text box will be generated dynamically i can't assign name of the text box . Pleeeeeeeeeeeeeeeeeeeeeeez help !!! Thanks :)

Member Avatar for Varun_2
0
2K
Member Avatar for shahera.arafat

hello everybody ^^ I have to make a calander ,and to let the user to insert any event ! the calander it self is working <<but I don't know how can I write the code to give the user the ability to enter a new event by entering some fields …

Member Avatar for shahera.arafat
0
138
Member Avatar for pars99

I have to draw an image using Graphics and Graphics2D. The image is Monstercat How would you guys suggest I do the parts that have several curves to them? Do I use multiple QuadCurve2D or is there a way to do it in one method? ![monstercat_logo_vector_by_lmw_ybc-d63hlvv.png](/attachments/large/4/d4b5cb7925e7eff4a402233b59be737f.png "align-center") On a side …

Member Avatar for JamesCherrill
0
229
Member Avatar for sirlink99

Hello Everyone. I am wondering if anyone has any experience working with Korean characters. I attempted to find out how to split them up, but I have had no success thus far. What I was thinking is having a character like "안" and having it split up into "ㅇ", "ㅏ"and …

Member Avatar for sirlink99
0
398
Member Avatar for bananacat

Hi. I'm using 3 classes: the Character class, the Scanner class, and the Test class. This is the Character class: public class Character { private char cargo = '\u0007'; private String sourceText = ""; private int sourceIndex = 0; private int lineIndex = 0; private int columnIndex = 0; public …

Member Avatar for rproffitt
0
346
Member Avatar for divinity02

hi everyone i am building this java command line game. it is called counting numbers game. here is the detail descripbing of the game This game consists of 10 questions which are broken down into 3 game rounds. See below for rules regarding the game rounds: Round 1 This round …

Member Avatar for rubberman
0
232
Member Avatar for kxjakkk

I'm attempting to make a small program that when a user inputs a string, it counts all the letters. Here's what I've got so far: import java.util.Map; import java.util.HashMap; import java.util.Set; import java.util.TreeSet; import java.util.Scanner; public class LetterTypeCount { public static void main(String[] args) { // create HashMap to store …

Member Avatar for JamesCherrill
0
309
Member Avatar for Pobunjenik

So I'm building this pretty simple top trumps card game as part of an assignment. I have the game logic built, the swing GUI is in place and I plan to do all the calculation on the server app and have it update the client up with the game's state, …

Member Avatar for Pobunjenik
0
685
Member Avatar for Melissa_2

I am working on an assignment for my object oriented programming class, it is a very simple program, but it has raised a question. My assignment is to create a rectangle class where I just assign points. The thing is we write our programs with notepad and run them through …

Member Avatar for JamesCherrill
0
160
Member Avatar for Goldfinch

** I was building a program that is supposed to paint an image in a JPanel. I should be able to select an image (such as a JPEG) from the Open item in the File drop down menu and then it should be visible in a new window. However, the …

Member Avatar for Goldfinch
0
198
Member Avatar for london-G

Hi! Basically I am trying to add the graph inside the Jpanel which already exists. I am getting the erorr "adding a window to a container" Here is my code public void displayGraph(){ try{ String sql = "Select pressure, ventilage from statstbl"; DBCon conn = new DBCon(); JDBCCategoryDataset dataset = …

Member Avatar for JamesCherrill
0
346

The End.