3690 byte By
artmaza at 2007-9-30 1:44:16
Hi,I need help with creating a program that uses a hashtable to count the number of words and punctuationsfrom a text file. I have some success in it counting the words correctly in the file but I cannot get it to count the punctuations or display the results in correct form ...
I'm working on an applet that will use the ( extends JApplet implements ActionListener ) In my first debugging stage, I want to display the basic message(s) and get the first input. If you are familiar with a similar program that uses these techniques, I will be happy to look at it. I ...
1401 byte By
Hal@a at 2007-9-30 1:44:48
HelloNot sure why all my applets quit working. For this one I am getting the error - c:\java\bin>javac AdditionApplet.javaAdditionApplet.java:3: Package javax.swing not found in import.Import javax.swing.*;AdditionApplet.java:7: Superclass Japplet of lass AdditionApplet not found.Public ...
2065 byte By
J0eFr0a at 2007-9-30 1:44:56
Question oneA mail-order house sells five different products whose retail prices are as follows: product 1, $2.98; product 2, $4.50; product 3, $9.98; product 4, $4.49; and product 5, $6.87. Write an application that reads a series of pairs of numbers as follows:a) product number;b) quantity ...
The following is the format of a text file from which I need to extract a couple of values.One way is to use Properties to load these values into hashtables and get it.But just for getting one or two values, I dont want to load every thing.Is there any other SIMPLE way. How about parsing using ...
Hi, Will let you know what I have done so far.E:/sampleapp/WEB-INF/sourcefiles/controller/ControllerServlet1.java/model/UserValidator1.javaI have set the classpath appropriatelyie., e:/sampleapp/WEB-INF/sourcefiles/controller /model This is where the class files will be stored.I have included ...
Hi, I am having trouble outputting a character array, here's the code:String input = "abcdefg";char letters [] = input.toCharArray();for (int a = 0; a < letters.length; a++)System.out.print(letters[a]);my problem is that this doesn't output anything however, when i change a to initially ...
Lets say I have 2 applets on 1 web page. Can one execute a method in the other andread back the results. I know it can be done through javascript. Is there a more directroute?Thanks.
can i compile a java file on a pc without installing jdk on this pc
K guys 5 dukes goes to the best example anyone can write.I want code for a JFrame in which you have a JPanel displaying a picture and a JtextFieldEverytime the User clicks on the Picture the pixel color or RGB value is displayed in the Textfield of the particular pixel clicked ...
K guys 5 dukes goes to the best example anyone can write.I want code for a JFrame in which you have a JPanel displaying a picture and a JtextFieldEverytime the User clicks on the Picture the pixel color or RGB value is displayed in the Textfield of the particular pixel clicked ...
after having a anyclass.java & anyclass.class how can i use my program in any computer even if this computer dosen't install sdk or any thing about java . how can i take it to any where i go?how to make exe file?
What does a java.lang.NullPointerException mena and what would cause it to happen?
Hi,I have an app with a GIF as a backgound, added as:Icon icon = new ImageIcon ("blah.GIF");I am painting dots and lines connecting the dots onto the extended JPanel using paintComponent().Of course without a call to super.paint(g); or super.paintComponent(), when I resize the window my line ...
Hello again world.Often times in the literature, when Java is compared to the C language, the writer will emphasize the fact that Java does not use pointers.At the risk of getting my '/as\{2\}/' chewed out, it seems to me that a non-programmer might say, "Yes they do, they just call it ...
How would I go about changing the width of the actual line drawn in a graph?
Hi newbe here, how to import other class from other java program?I tried:let's I have a java program a.java(class a)In my program b.java, I would like to import aI type:Import a;while I compile the program, it prompt : a does not ...
91 byte By
xytora at 2007-9-30 1:46:36
how do u put the dos window that all the output normally appears in, into an applet?
62 byte By
cjo_78a at 2007-9-30 1:46:56
What's the difference between a JComboBox and a JList?
845 byte By
apcssa at 2007-9-30 1:47:16
hi ppl, i'm doing a linkedList program which should insert values in order..my insert code:public void insert(int id, int inv){ ListNode pos = null , back= null;Object value = new Item (id, inv); if (size == 0) first = last = new ListNode(value, null); else pos = first; while ...
I keep getting "unclosed string literal" errors when trying to compile the following code.There is obviously something about my MySQL statements that Java doesn't like,but i can't seem to structure it in a way that java find it acceptable. Can anyone tell me where i am going wrong?public void ...
I just got a new computer and now I can't update any of my preexisting home pages.This keeps coming up and won't let me go to any page builders. How can i fix it!!?SB
489 byte By
kkirlesa at 2007-9-30 1:47:58
Hi- I am very new to Java and am currently taking a course for school... My assignments are to create a .java, a .class and a.html file for each lab. The link to my class is.... http://www.cs.iupui.edu/~mroberts/n307/I use Windows at school, but then only have Macintosh 10.3 at home... I have ...
No matter what I try, my Jsp returns a "NullPointerException" everytime I try and run it. Can anyone see where my problem lies?The methods that I am using and the jsp code are displayed below,public void roomsBooked(String arrivalDate, String departureDate) throws SQLException, Exception{if ...
362 byte By
danbuga at 2007-9-30 1:48:07
I have been trying to use a random number generator to create graphics. The problem is that random retuns a double. I can conver that to a long, but then cannot convert it to an int. (int is needed for drawLines, etc.) I can conver a float to an int, but not a double. So, I need to convert a ...
Sorry about the repost,I have been trying to get my JSP to work all night but with no success. At the moment it outputs the total set of data which I presume means that my queries aren't being executed properly. They work fine when typed directly into MySQL. Can anyone see the problem?The ...
1977 byte By
Hal@a at 2007-9-30 1:48:20
HelloHow do I prompt for a response into the text field YourguessField?thanks for any help!import java.applet.*;import java.awt.*; import javax.swing.*;import java.awt.event.*;public class GuessAgain extends JApplet {// graphical user interface componentsJLabel YourguessLabel, correctLabel, ...
What Operating Systems does java run on ? I have been looking about for some sort of list but couldnt find one. It is just out of interest.Does anyone have any idea ? Thanks :)
Hi, brothers.I hope that my following question doesn't sound stupid to you and also I hope that you will not get mad because of the comparison I'm gonna make with another programming language.In C# and Visual Basic I nodest that those programs can make .exe-files of a program written in that ...
742 byte By
Nediara at 2007-9-30 1:49:46
I'm working on a project using the Mozart development platform ( http://www.mozart-oz.org). It is a wonderful platform for rapid prototyping and research, however it's very hard to sell the final product of our research (a middleware) to the industry. So we would like the investigate how we ...
hey guys. i have yet another java question. i'm just starting this whole java thing so i'm a little slow at it. i was just wondering how you would write a while loop that would make message boxes pop up. as in... let's say the user wanted to enter a number, then that many input boxes come up ...
Can someone please tell me how to fix this line i know whats wrong with it in that im trying to make an object = to a string any help would be appreciatedString Queue = jComboBox3.getSelectedItem();
I need some help in 2 questions, thanks for your posts!1. Can I join 2 or more chars in a string?2. Can I return a array, like this?double[ ][ ] returnarray(){return darray[ ][ ];}When I try it gives-me this error:DynamicArray.java [44:1] '.class' expectedreturn darray[ ][ ] ; ^Thanks for ...
346 byte By
xytora at 2007-9-30 1:51:06
i have heard that you can make an array of objects, whose length is not defined, for example, you can add and remove parts of the array at leisure.this is usefull if you have an array of objects, and it will probably change during runtime.how do i code this "array list"and can i replace my ...
612 byte By
delibena at 2007-9-30 1:51:08
Hi,this is my very first day in the world of Java. I have downloaded the j2sdk1.4.2 with net beans IDE 3.5.1and installed it correctly to a diffrent local drive as suggested.I now hardly try to set the classpath but somehow it does not want to run . How do I set the classpath for the sdkTools ...
482 byte By
patyorka at 2007-9-30 1:51:13
Ok this is a stupid noobie question but when I have a floating point it gives me alotmore digits than I require.for instance I want the value 0.12 but I get 0.11999999.So in my for loop it jumps out 1 iteration earlier than I wouldlike because the condition in the for loop states <= and ...
Ive got some java files that Im running in an IDE. The class files run perfectly, but I cant compile the .java files after trying to add a bit of extra funtionality. I was wondering of anyone new how to extract the original java file from teh class file so I can compare and sort out what Im ...
I am attempting a simple ball animation. When it is drawn in a conventional applet it is OK but when in a JApplet, the ball is like a snake with the head moving upwards and every ball that is drawn staying where it is. Does anyone know why this happens and how I can fix it?you can view the ...
Can anyone tell me how to open a file with InputStream?
what datastructure in java can I use to store the resultset obtained using jdbc ... if the resultset has a number of columns that I want to store. Then use that datastructure again with another resultset to change stuff..?
Hi Jverd and Bsamp.. You were both helping me with this and I think its finally done ... so I wanted your suggestions and see if you have anything to say about this.. UDPClient looses about 15% of datagrams in the process of transfer and since I have a 1 second timeout its taking about 15 ...
89 byte By
plassna at 2007-9-30 1:52:43
I want to paint a pixel only. How do I do this without using the drawLine-method?
Hello,is there a way to find out a way if a String is null without getting a null pointer exception?Cheers
Tell me simply that how i can get exprence in java, I am very crazzy to get experties in java , but how i can do it? I know some about java and also develop the project using java, but i want to learn it and understand it at professional level. so what the good way?
Hi,I would like to create a client socket in one of my methods, send some stuff, then have other methods be able to access the socket. I have code similar to this://class member variablesprivate Socket CommSocket = null; //the socketprivate BufferedReader in = null;//to read Strings from that ...
I need a datastructure that can store an object, and then point to 0-4 other objects. Sort of like a Linked List, where each one points to the next, except I need each one to point to up to 4 other ones. I think those things are called Tree's, but the only ones I can find are JTree and ...
Hi,I have an issue with a resultset that contains, lets say 3 results, when I refer to it from outside the object that originally created the ResultSet, it loses the contents, the 3 results no longer exist.Even if i pass the resultSet to the class I call it from, it finds null. Not sure if this ...
543 byte By
Mr_Carla at 2007-9-30 1:53:47
i need to create a program that involves taking in a file name as command line argument, reads the file and then displays its contents on the screen. it needs to work with any file with a .txt extension.The only thing i dont fully understand is how to read the file name as a command line ...
I have a class assignment that does this: ask the user for the productID, price, qty and tax. We're supposed to put the business logic (ex., calculating subTotal) in the problem domain tier with regards to three-tier design.The example my instructor gave me to test this project is not working ...
I really don't know anything about all the things that you guys talk about.I just want to know 1 thing. I had to install java or else a program wouldn't run, and now every time that I close my computer, I am asked to first close down Java. Why is that, is there a way, that it won't ask me ...