36,051 Topics
![]() | |
I have implement the chat sever.When I start to type the message to the server It says"Server has close the connection: java.io.EOFException" I don't what went wrong with my code. Can you plz have a look at it or give me some advice. [CODE]public class threadMiddle extends Thread { public … | |
I have a Java program, which launches a app, but before starting, it checks for the version.txt file, and if it doesn't exist, or there is a newer version available off my site, it downloads it. Well, not quite. I've got the part that checks for updates, and file existence, … | |
I am trying to create an application that will: 1) ask the person to enter a number (ex: 321) 2) the application will display each number on a line ex:3 2 1 Rules: Don't use looping and don't use arrays Someone told me it could be done but I can't … | |
Hey I wanted to make a thread for not only myself but for others to give a "thank you" to anyone who has helped them. In my case, without some suggestions here, I would have been stuck for days on a single thing and not be able to advance further. … | |
Hey I want to "reset" a array....What would be the correct way to do it? Code A: [code] for (int i=0;i<=somearray.length;i++) { somearray[i]=0; } [/code] or Code B: [code] somearray=null; [/code] Thank you | |
[QUOTE]The below code runs fine the only problem is when I run this code there is a value of "3" in the input textbox which should be null, I have no idea why its doing this any help will be appreciated. THANKS[/QUOTE] [CODE]import javax.swing.JOptionPane; //inherits from Monument class---> public class … | |
hi, i am new to java and i am using eclipse for java coding when i run a build.xml file it says build fail and says "Compile failed; see the compiler error output for details." and points to the code below. does anyone know the reason for this, [CODE] <javac … | |
lets say we have a string String ss="file1"; now i want to create a variable (a file variable) and i want its name to be file1 which is the content of the string ss. | |
Hi all. I could really use some help on adding a node to the end of a doubly linked list. First off here is my node class along with the class where the adding should take place. For simplicity I did not add the other parts and classes of the … | |
I would like to implement an error reporting mechanism into my application: If an error happens the user should be able to directly send me this error message. I thought of doing this with JavaMail. My question is now: to send an email I have to authenticate on an SMTP-Server. … | |
Hey All of a suddent my Apache Tomcat server has broken. Very strange but I try going to [url]http://localhost:8080[/url] and I get a HTTP 400 error. How do I fix this as it is very strange that this suddenly appears. Using MyEclipse. Note, I believe I installed NetBeans which installed … | |
i don't know what setting have to make on linux to run jsp programm using tomcat, please tell me what setting and how to do. | |
Hi, I wants to ask about how to call the javascript function/method in .aspx file from code behind(or server code)? for example: Javascript: [CODE] function initCard(userid) { //userid, balance, subsidy breakfast, subsidy lunch, subsidy dinner var iRet = winCtrl.initCard(userid, 0, 0, 0, 0); } [/CODE] code behind: [CODE] Dim sb … | |
i'm trying to create a program that asks the user to input a file (but the file name is standard name that will not change) and input a specific character. The program will use looping to find how many of that specific character is in the .txt file. This is … | |
Hi Im writing a beginner program that computes the value of Pi ( pi/4 = 1 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 +... ). I've done this one, but now I want to find out how many terms do i have to use beofre i first … | |
Started this thread in the python area but seeing as Jython is a fusion of java and python I thought I'd post a link here in case someone can help [URL="http://www.daniweb.com/forums/showthread.php?t=415593"]http://www.daniweb.com/forums/showthread.php?t=415593[/URL] | |
Hey all I need some help with Jython. In Python I'm given the easy option to read a file with [CODE]file = open('/dev/input/js0')[/CODE] Then I can put it into a non blocking mode with something similar to [CODE] import os, fcntl file = os.open('/dev/input/js0', os.O_NONBLOCK) [/CODE] But in Jython I'm … | |
Hi all. I'm having trouble with this simple Java program. When I compile it, numerous errors would happen. I put in let's say 50 miles for the speed of the car and 2 hours for the traveling hours. I run it and it you see this: Hours Distance Traveled --------------------------------- … | |
I have created a program to display salarys, calculate a bonus payment and display total. Wages and total are my two arrays. My problem is, when i run the program, my element starts at 0.i need it to start at one but it cant skip the first value in my … | |
hello all just need help with compiling public class Passenger { //instance variables private String name; private String address; private String emailAddress; private Flight flightBooked;// will hol the adress of the flight object //constructors public Passenger() { this.name = " "; this.address = " "; this.emailAddress = " "; this.flightBooked … | |
Hello i am developing a web app...i am using MVC architecture in my design. i have one form add_Flat.jsp in which admin enter the flat details and it will be stored in database (MS-Access) no other jsp page would be open on submit button.just a message displayed on add_Flat.jsp. How … | |
hello everyone, help me in centering the frame which i developed using swing. Here is the code: [CODE] import javax.swing.*; public class RSAInterface extends JFrame { public RSAInterface() { setTitle("RSA by adil"); setBounds(200,200,300,300); setResizable(false); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel panel = new RSAPanel(); this.add(panel); } } [/CODE] [CODE] import javax.swing.*; public class RSAInterfaceTest … | |
Hi, is there any way to return the array from the Checkgpa class back into the Gpa class for an output? I am still new in this topic. [CODE]public class Gpa { private String name; private char result; private double gradep; private int num, sem, ch; public Gpa (String na, … | |
hi i work on project in java and i use tcp and after that i almost finish the project then i have to create an applet and the applet doesnot work with tcp so what can i do i need any help? | |
Sir I want to show certain cities only in some container in java desktop application. Which is the best way to do so thanks. | |
I'm having some problems when trying to set a panel within my JFrame to visible when someone either presses enter or clicks the JButton within my two methods shown in previous post. I am getting the following error: Cannot make a static reference to the non-static field Interface.panel. The code … | |
I m trying to select data from a drop down and retrieve & display the values corresponding to it into textboxes.. the data to be displayed into the textboxes is taken from database(mysql database).. The scripting is done in JSP which is as follows: issue_from.jsp [code] function showDataIssue(){ xmlHttp=GetXmlHttpObject() var … | |
Is this a real class? I am working through a Deitel book, and they use it, but my program does not recognize it. I am importing the same libraries as the example in the book. | |
hello m new here starting java can anyone guide me how ti initilize array of objects in java em receving java.lang.NULL pointer exception ` choice=Integer.parseInt(JOptionPane.showInputDialog(null,"Enter choice"));` Patient pati[]=new Patient[49]; if(choice == 1) { pati[i].setdata(); pati[i].showdata(); count++; } if(choice== 2) { pati[count].update(); pati[count].showup(); } }while(choice!=3); } | |
hi hello! im planning to do a payroll system for our defense project,im a beginner and i want our program to be more complicated in a way that we can still be able to explain it. I want our program to be able to have multiple input boxes, because the … | |
Hello all, I'm trying to insert a new node using xpath. This is easy to do, but when i'm trying to add attributes to that node I get an exception. Here is my code: [CODE]reservationExpression = xpath.compile("/hotels/hotel/room[@id='" + roomId + "']"); Node room = (Node) reservationExpression.evaluate(doc, XPathConstants.NODE); Node reservation =(Node) … | |
Hi frnds!!!!!! Am trying to crop an image using java.. If I draw a rectangle on the image it ll crop the image in the given level.. My code does it but the fact is, it is not cropping the actual part which we selected..This is my code.. [CODE] import … | |
I'm working on a Palindrome program. For some reason, my compare method always return zero. "c" should suppose to increment 1 when both letter are the same, but my method would not increment 1 when the letter are the same for some reason. I'm not sure where is the problem. … | |
So here is the deal, I can not use Java. I went to touch up on my Java Programming Skills, so I could help out a few of my University friends with programming... And guess what. I can't use Java. Now I have been dealing with this issue for about … | |
I have been given a project to create the interface and code for a ticket seat calculator I have to produce the quantity and price which is from a text box on the main frame pass them into the seat class to create the totals then pass it into a … | |
Ok - so I have an object "A" that has a value (for the sake of example here, it's initialized to 0). I'm making a GUI and I've created a panel that is supposed to display the amount from object "A" in a label which shows up on the screen. … | |
Hello, I am trying to work through an example from a Deitel book. I keep getting a "source not found" error on line 27 of the LabelFrame class. I have put the "bug1.png" in every single directory associated with this project. I am stumped... [CODE] import java.awt.FlowLayout; import javax.swing.JFrame; import … | |
Hello, I'm writing a small game for a class. The problem is when i run it it starts consuming the computers resources, i bet i've done something very wrong but i just can't find it (haven't even added bouncing back from the paddle to the code, or game over for … | |
I am developing a Interactive Spoken Dialogue System, in which user will say something to the system and system will answer him in voice and generating facial expressions according to the voice. But, i can't get any idea that how can i generate facial expressions. Will anybody tell me that … | |
Hello, I'm working on an application that uses a ServerSocket, but it (at points) stops the server thread and restarts it, throwing a java.net.BindException: address already in use exception. How can I unbind the ServerSocket (.close() is not working to unbind) so I can re-use the same port seconds later? … | |
in Attached Files there is Question i do not understand the last step how to coount it ? [CODE]package javaapplication178; public class JavaApplication178 { public static void main(String[] args) { int x[][]={{14,7,5,0}, {9,20,25,12}, {25,25,40,30}}; for(int i=0;i<x.length;i++) { for(int y=0;y<x[i].length;y++) { System.out.print(x[i][y] + " "); } System.out.println(" "); } PrintStock( x); … | |
Hi, i am beginner in java. I doing my final year project in Java Swing. So far, somehow through some online tutorials and articles, i learned to finish 30$ of my project. Now, i need to know how to insert the data from my database into Jtable and display it.... … | |
I need to just make the column headers invisible in JTables, as i need to create a matrix. How can I do that? | |
now I try to develop the tcp chat server So what I have done so far -my server can only received string from the client -My server can show the total of the connection So what I want to ask what do I need to do to make the server … | |
hello, is there any function in java that can give me 2^n binary combinations. as an example, if the value of n = 2, output should be: 00, 01, 10, 11 ?? | |
I need my overall data to all be output as double, but my counter is an int, and i imagine you cant use a double as a counter, so when it goes to compute my data, theres a mismatch between my counter and the rest . i need a way … | |
I need everything to come out as a double rather than an int. I dont know how to do this other than creating lots of variables! Is there a way i can convert? my counter is causing the problem but i dont think theres another way to do it.The program … | |
Greetings Everyone. I'm working on a program that will take the number of calories and grams of fat, and give the user the percent of calories from fat. The problem arises when I use the Calculate button. [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; public class FatGramsPanel extends JPanel { … | |
I want to create a code that will allow me to calculate bonuses based on the 10 salarys. i need if statements for this, i need to then assign the new value to my other array i have set up called total, and then i need to display that as … | |
Hello. I got an assignment and I've ran into some troubles. I have 3 classes. The first class could be labeled as the main class, and the other two classes must be linked to the first one. The 1st class is named "Holiday" and has 2 key attributes: tour_guide and … |
The End.