32,199 Topics

Member Avatar for
Member Avatar for SMITA6076
Member Avatar for rosey_fci

hi everybody I have a little problem I can not fill all the cells in the table that I made by java swing can anyone help me

Member Avatar for mKorbel
0
60
Member Avatar for ladybug24

Hi Daniweb community! I started learning javascript in school, and the best way to learn is to get into it. So I found a Sudoku game online "http://iphone.janjanousek.cz/isudoku/" and download the files on to my hard drive with much success (all the scripts). The game and site is very well …

0
128
Member Avatar for ubi_ct83

Hi all, my assignement is developing an API. my API should be used by developer in 2 ways.1 is computer base developer and another 1 is web developer.im using java application.the problem is, i dont know what must i have to develop an API for web user

0
65
Member Avatar for kris0r

Hi all, I am currently trying (and now wondering if) you can add multiple threads to a program to do the same job? Basically I am writing a web crawler for a search engine and it adds many URLs to an ArrayList which is used as a queue. I add …

Member Avatar for kris0r
0
466
Member Avatar for MrVladar

Hi! I am creating a desktop Java application using Netbeans. My task is to generate an array and than sort it (InsertSort, SelectSort, BubbleSort). My question is how do I show the value of all elements from generated array into the textfield? What i have tried to do is: [CODE] …

Member Avatar for MrVladar
0
350
Member Avatar for gman1991

import java.util.Scanner; public class FirstProgram { public static void main(String[]args) { Scanner input = new Scanner(System.in); int x = 3; int num1, num2, num3, num4; while (x <= 3) { System.out.println("enter a number 1,2,3>"); num1 = input.nextInt(); num2 = input.nextInt(); num3 = input.nextInt(); num4 = input.nextInt(); { if (num1 == …

Member Avatar for gman1991
0
88
Member Avatar for sciprog1

Hello Members, I am trying to add weights to a Graph that is implemented using JGrapht. I keep getting a NullPointerException, which I am unable to understand as all other edges seems to be added fine. I would be grateful for any help. The code so far: [CODE]import org.jgrapht.*; import …

Member Avatar for sciprog1
0
2K
Member Avatar for kesh1000

hi can anyone tell me why the netbeans ide generates a null pointer exception. here my code. for class CustomFileFilter [CODE]import java.io.File; public class CustomFileFilter extends javax.swing.filechooser.FileFilter { private String extension; private String description; public void setDescription(String description) { this.description = description; } public void setExtension(String extension) { this.extension = …

Member Avatar for kesh1000
0
182
Member Avatar for djbuclkle

I am currently writing a program in which you input a word and the program then outputs all of the different ways the characters can be moved round into anagrams. I have wrote a way of turning the command line argument into a char array using the toCharArray() now I …

Member Avatar for JamesCherrill
0
169
Member Avatar for Effrego

I'm using PrintStream, to put some text in a txt. But how do I append to the end of the file? I saw some code whilst google-ing and it had other inputbufferstream stuff in it. Does PrintStream have its own append option?

Member Avatar for masijade
0
62
Member Avatar for BubblesKulit

hi, i have a problem comparing values in an array and how to display them sample: [code]int[] d = new int[c]; for(i=0,j=1;i<d.length;i++,j++){ d[i]=Integer.parseInt(JOptionPane.showInputDialog("Enter value : "+j)); }[/code] i don't know how to start comparing values of each index's in the array..can someone help me? thanks BTW(new to this forum):)

Member Avatar for peter_budo
0
154
Member Avatar for ARaza110

Hi, I have a problem related to Java servlet sessions. I don't understand why the getAttribute() function of the session object is used before setAttribute(); Here is the code: [code]Vector buylist=(Vector)session.getAttribute("Register"); if (action.equals("del")) { String del = request.getParameter("deli"); int d = (new Integer(del)).intValue(); buylist.removeElementAt(d); } session.setAttribute("Register", buylist);[/code] Thanks.

Member Avatar for mKorbel
0
402
Member Avatar for cwarn23

hi, I have the following code and it compiles on Netbeans with no errors or warnings but when I load the applet in a browser the browser does not display all of the pictures that I got it to draw. The only picture it draws is my_gif. I have tried …

Member Avatar for cwarn23
0
206
Member Avatar for jdm

I'm working on a simple program, but I help with a part of it. When I click the submit button I need the name field to be cleared and for all of the checkbox to be unchecked. I have the name field done, but I need help with unchecking all …

Member Avatar for jdm
0
2K
Member Avatar for tracydo

Please help with this program! I wrote & modified this code many time but not quite find a good solution for it. Below are some error after complied. Program problem: Input: student names, student IDs, their courses and letter grades Output to a file in table layout format with: College …

Member Avatar for dononelson
0
497
Member Avatar for Dannyo329

While coding a random Employee storer, I use Scanner, and its .nextInt(); to ask the user for the employee's contact number: [CODE] Scanner Scan = new Scanner(System.in); out.print("\nEnter Employee Contact Number:"); newEmployee.contactNumber = Scan.nextInt(); //(I have a class Employee) [/CODE] I get the error : [CODE] Enter Employee Contact Number:456645 …

Member Avatar for Dannyo329
0
4K
Member Avatar for Armanious

This code highlights all instances of keywords in a JTextPane. I don't think it is very CPU efficient (it has three loops per LINE) It splits all the lines, creates a Matcher for each keyword, and iterates through those, which consequently means slow execution with larger files. The thread is …

Member Avatar for VernonDozier
0
150
Member Avatar for priya1989

hi everyone , m new in development field, currently doing a project for my friend on android, client based application, need help any one....

Member Avatar for JamieLynnSEO
0
62
Member Avatar for kodera

here is the error message: Exception in thread "main" java.lang.NullPointerException at DriverClass.DriverExam.questionsMissed(DriverExam.java:48) at Chapter7ALabDemo.main(Chapter7ALabDemo.java:33) program is to read a answer key txt and a student's answers txt, then the number of questions would be entered to correspond with the txt file. and here is my code in two files: [ICODE] …

Member Avatar for kodera
0
109
Member Avatar for drjay1627

Hello, I want to create an application that can make selections from a webpage. I did an assignment for school and now I want to extend my program. The assignment was to parse a webpage and display the data. The webpage's exact URL was given to us. The URL was …

Member Avatar for drjay1627
0
155
Member Avatar for guccitan88

New to Java! We have to create a "sales" 2D array and initialize it with 100.00. Then we have to up the 3rd quarter by 500.00 and then lower the 4th quarter by 50.00. I know there's something simple I'm missing, but I can't quite figure it out. Any help …

Member Avatar for guccitan88
0
130
Member Avatar for ndiiie

Hi all, I want to ask a question about replacing specific word in a string for example I have a string of: input = a fast nope e i want to replace word "a", if I use method replace which is: input.replace("a", "hello"); the character a in fast will also …

Member Avatar for dononelson
0
181
Member Avatar for chiefpf

I need to write several algorithms and one is giving me trouble. The one giving me issue requires the use of recursion to produce a summation for an integer. For example summation(4)=0+1+2+3+4=10. The code I am working with is: [CODE] public long recursion(int N){ if (N <=1) return 1; else …

Member Avatar for masijade
0
2K
Member Avatar for vJeel

Hi, I would like to learn the backtracking algorithm. I do some prior knowledge in algorithm. Can someone please direct me to a good website that can teach me backtracking algorithm or a video. If someone can teach me on this thread that would awesome. Thank you. P.S I was …

0
41
Member Avatar for JJHT7439

Alright, I admit that I'm struggling a bit with Java but for the project that I'm trying to do I need to create a bunch of bank accounts and then calculate the interest and return the names of the account holders and their balance and interest, as well as the …

Member Avatar for JJHT7439
0
3K
Member Avatar for pooran.c

I need to implement gregorian calendar in java Please give me ideas how to start and what to use?

Member Avatar for mKorbel
0
108
Member Avatar for plasticfood

[CODE]if(count == 4){ qFinal.enqueue(q.peek()); if(count3 == 0){ System.out.println(qFinal); break; } else{ sort(qFinal); } } [/CODE] this code is inside a while loop, and with the break statement, it should break out of the loop right? instead i think the program also executes the sort(qFinal) method b/c after it prints qFinal …

Member Avatar for masijade
0
192
Member Avatar for stephenk291

Basically I need to setup a conditional loop to have the game run up to 10 times and then have it display the results for both the computer and user. I have my display function in the works but how could i setup the loop or counter to run the …

Member Avatar for JamesCherrill
0
234
Member Avatar for eileenc87

Dear All, How can I call a javascript to my VB.Net Window Application. Apprecited for immediate attention..

0
66

The End.