32,204 Topics
| |
i was coding GUI in Java. i'm just a beginner and i can't figure out on what program is mistaken please help me on this: [B]Compilation error is:[/B] helloworld\FourthApp.java:38: class, interface, or enum expected public static void main(String[] args) { ^ helloworld\FourthApp.java:40: class, interface, or enum expected } ^ 2 … | |
Hello everyone, Can anybody tell me how to call javascript in Reasonable Servlet Faces(RSF). | |
hello everyone, i am using OSM in a swing application. Now what i needed is that when i clicked the mouse then it must perform Zoom in/out on the OSM. i could not able to perform the actionClick action for the mouse. How can i able to do it. If … | |
Hi in this program i want it to run for 720 loops but it keeps stoping short for some reason. There is no compilation error or runtime error. [CODE]import java.util.LinkedList; import java.util.Random; public class Simulation { private LinkedList<Customer> customerList; private int minutesThatHavePast; private int customerNumber; private int customerProcessTime; private int … | |
Hi all, i'm developing a web-base system.user enter the data in mysql.my main system retrieve the data using jdbc.my problem is, i dont know how to make the system keep on checking the new data in database.i want it always check the mysql for any new data. i need your … | |
Is it ever acceptable to make instance variables public? If so, when? | |
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 | |
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 … | |
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 | |
| 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 … |
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] … | |
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 == … | |
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 … | |
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 = … | |
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 … | |
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? | |
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):) | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
hi everyone , m new in development field, currently doing a project for my friend on android, client based application, need help any one.... | |
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] … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.