470 byte By
Elvisa at 2007-11-27 6:00:42
Hi all,I new to Java, and im opting to go for Java instead of C#. Im currently familer with flat C, and i would like to practice some OO. Which one of the many varients of Java, will create desktop applications, similar to C#?I have been looking at Net Beans, but im a little lost of which one ...
153 byte By
Leshonea at 2007-11-26 22:59:06
This is leshone can someome please help me with my program. All the details are listed in my other posts. I actually need help and I'm a student.
I'm a Informatic Engeneering Student, but I didn't had a good base in Java Programming, so i've got dificulties in Java Programming: interpretation and writting codes.By now, i've got a faculty-work on my hands, and I need help.I've got to write a programm that fakes a rolling cube, some ...
130 byte By
Chadhaga at 2007-11-26 16:48:08
How can i invoke a JAVA swing application within another JAVA swing applicationMessage was edited by: Chadhag
I would like to know how the toString is being called from the constructor in the following code.Any feedback would help me to improve my understanding of java concepts.***************************************************************************************// CharSequenceDemo presents a String ...
Hi,I am totally new to java and currently i am building j2me applications for my company. Due to the amount of programming knowledge i have for understanding the codes, i have been taking samples from the Internet and mixing them up to make them work and achieve what i need.I feel if i ...
how can we close a pop-up browser automatically using java?
377 byte By
Java1a at 2007-10-2 7:37:06
code - 1{ String a = "ABC"; String b = "ABC"; boolean c = (a==b); System.out.println("a == b? "+c);}code - 2{ String a = new String("ABC"); String b = new String("ABC"); boolean c = (a==b); System.out.println("a == b? "+c);}Why the output of code 1 and code 2 is ...
Which Algorithm is best for Encryption & Decryption.
428 byte By
berghra at 2007-10-1 4:09:00
HII have completed the SCJP and I still find myself struggling to actually startwriting applications.I never have and idea where to start, when to use inheretance andhow to separate object layer and database layer. I was wondering if anybody could suggest a book that will help with writing and ...
314 byte By
calibuga at 2007-10-1 2:27:16
I've just installed java 5.0 on windows 2000 professional sp4, when I try to complile my program i get the following error ...java.lang.NoClassDefFoundError: myprogram.javaIs this a problem with my configuration, installation, or path? Please help I am trying to learn Java on my own. ...
Hi everyone,I had signed an applet, but it seems that nothing have happenedNeed I have to pay for a company in order to have the certification? Or my tag is wrong?<APPLET NAME="MyApplet" CODE="MA.class" archieve="MyApplet.jar" WIDTH="0" HEIGHT="0"> Thanks in advance, Joel ...
to generate numbers to multiply i made this:int f = (int)(Math.random() * 1000);int k = (int)(Math.random() * 3);double parcela = f * Math.pow(10, -k);return parcela;and got this:25.3 x 7.930000000000001how's it possible?do i have to format ...
if i do this, its ok:double c = 5e+2;but if instead i do this, gives me that error msg:int k1 = (int)(Math.random() * 3);int ax = k1;double c = 5e+ax;why?thanks in ...
187 byte By
rousava at 2007-9-30 2:26:10
How can we set the character width of every character entered in a TextArea to be the same. I mean the width of a 'w' is the same as that of an 'i' .. Thanks in advance.
i want to generate random numbers that allways have 3 digits:123 or 1,23 or 12,3so far i'm unable to:class Multiplicar {// gerar n齧erosint f1 = (int)(Math.random() * 100);int f2 = (int)(Math.random() * 100);int k = (int)(Math.random() * 3);double f11 = f1;double r1 = f11 / ( 10 ^ k);} class ...
Hello.I'm new to Java, OOP, and Internet forums. So much for introductions.My question has to do with the various hierarchies that are mentioned in the docs. I have so far seen reference to the "class hierarchy", the "interface hierarchy", the "collection hierarchy", and the "package ...
K i am new to this so please bear with me and talk to me in "english" and not "java" :O) thanks guysERRORs :::C:\Computer Work\History.java:25: cannot resolve symbolsymbol : variable length location: class java.lang.Stringfor(int i = 0; i > studentID.length; i++)^C:\Computer ...
133 byte By
hjounia at 2007-9-30 2:25:35
i am new to java technology ,,,i am just trying to output the date and time of my pc example Mar 06 2004at 21:30
I know how to call applet methods from javascript but can I call javascript functions from within an applet? How?
No matter what I do, I have no control over the size of child windows. This is pretty simple, but it's ignoring me totally. Here's what I've got:// The container stuff seems to work fine. I'll include it here in case I've done something stupid in it that's affecting the child ...
737 byte By
bp2alba at 2007-9-30 2:25:20
Hi, I'm new to Junit and have read all the info on Junit.org but am stuck. For some reason, Junit keeps telling me that "No tests were found in TestValidator".Here is my simple test class:testimport junit.framework.*;import edu.depaul.cti.se450.traffic.common.Validator;import ...
Hello, I am trying to pass a Thread a object to modify. I get the error :local variable dateLabel is accessed from within inner class; needs to be declared finalmakeClock(dateLabel);^ however I want the Thread to modify the object...so if I declare it final I won't be able to change the ...
How does one go about creating a 3 -diminesion String array...?Im currently using an ArrayList, but I need to store 3 related values at one index and can't find a way to do this with an ArrayList. I have thought about a Vector of Vectors, but isnt a 3 dim array more efficient ?Any help is ...
How can I know if a number is even or odd?
Hello, I have a jpanel that I am displaying a clock on. I want the clock to update every minute.I can do this with a while loop, but it blocks the rest of the program from running. ShouldI start a new thread to update the clock or is there a better way to do it. A thread isjust another path of ...
3917 byte By
patg004a at 2007-9-30 2:25:02
Im pretty new to java, and I'm trying to make a MASH program to practice. I cant figure out this error, as it checks out with some examples from a book. Please help! When compiling in the command prompt, this is what the errors are:cannot resolve symbolsymbol: class MashBuildlocation: class ...
Hello,I am working on a small project and I am having trouble compiling one of my classes. I have an instance of a class that is defined from this class and when I compile the class from the command line, it says cannot find symbol. Both classes are in the same package and all capitalization ...
Is there double array in java? If I want to create a list, and each element in the list is another list, how can I implement this?Sorry for posting these kinds of questions, but I can't seem to find the correct place to for such things.Thx
169 byte By
123avaja at 2007-9-30 2:24:46
HI Im trying to do a java code to calculate cyclometric complexity for any java file. Could someone explain how it works and how i can code it?Thanx
67 byte By
vik_paa at 2007-9-30 2:24:37
How do I add a two dimensional double array to an arraylist?
Hi,I have a data file to parse through, and when storing the elements of the file, it seems convenient for me to make a HashMap that has a String for a key and a HashMap as a value. Is this a bad idea? I can mess around with ArrayLists and also succeed, but it is not as straightforward as this ...
Hi, can anybody tell me how to save a html page generated by document.write? Because when I click on IE's save button it save the page containing the script, instead of the generated page. Pls tell how, thanks.
507 byte By
wpascoea at 2007-9-30 2:24:09
Hi all,I am trying to create an object that will be made up of other objects. I have created all of the other objects, but I am struggling to work out how to create the main object.The main object must have at least one of a certain kinds of objects, exactly one of a certain object and 0 or ...
Hi, im trying to create an Arraylist containing 10 objects from class Child (see below). Each Child has an age between 1 and 30 which should be randomly generated but for some reason each one is the same. However when i use the BlueJ debugger and step through the program it creates ...
Does anyone know how to draw a straight line from co-ordinates (x,y) to (a,b) in Java? All the examples I have found seem to be for Applets only.
The code below, Im using to insert a record into my access database called "db1". In access if I don't assign custID as the primary key I can insert as many records as I want, but then this fails the point of having custID field. If I assign custID as primary in access, then I can only insert ...
Hi, i have had a look through the forums and i can't find anything along these lines.Basically i am trying to generate a hash code using the modulus function but for some reason i am not getting the expected value back (or i am expecting the wrong value). Could someone tell me where im going ...
erm... I'm new to Java and i was wondering why the following piece of code won't compile... public class test {int i;i = 1;//This gives a compiler error... It says and <identifier> is expected...public test() {System.out.println( i );}... //add public void static main(..) and stuff... } ...
400 byte By
Rufus0a at 2007-9-30 2:23:03
Is there a method like:Socket s = serversocket.accept();that does not block a program?Or a method for checking if there are any connections waiting to be accepted like:if(serversocket.connectionsWaiting()) {socket = serversocket.accept();}Thanks, ...
45 byte By
lml919a at 2007-9-30 2:23:01
how to access/modify windows register?
Hello, can a method return two objects to the caller? Or should I just put the objs in a array and return that?thanks,jd
Hi all, I'm sure this is a stupid question but I wanna check anyway. I'm trying to make a "nice" implementation of the Class getColumnClass(int col) method of an AbstractTableModel, and have a question:In the following examples ii would be a member of a class representing the structure of a ...
I hear there are things called "Graphs" which are sorta like Tree's, except nodes can connect to any other nodes, not just parents to children. Does java have these? All the search'es I've done so far gave me either drawing graphs (ie. x-axis and y-axis type things) or GraphICS, which isn't ...
I get a bar on the bottom of my screen when on pages that require Java, " Java Applet Started" is typical. Folks I've asked about this say they aren't getting it. What is the cause and what is the solution? I'm using Windows XP, and this most often occurs in Yahoo's game rooms, if this ...
Hello, I have a method to add buttons to a JPanel. This JPanel uses TableLayout. Every buttonis added on top of the other. When they should be added side by side. Could someone tellwhy the buttons are added on top of each other.Thanks,jdhere is the method.... public JPanel BuildPanel(JPanel ...
Hello everyone,I am wondering if someone can help me out with a problem I am having with a Jar file. I know how to create jar files. The problem that I am having is that I have a java application that I have written. That application runs just fine when I run it from the command line, however, ...
Hello again world.I copied this code from a forum posting and have been able to get it down to just one error message - whose location I have marked with a comment.import java.util.Vector;public class Chorus{private Vector v;public Chorus(){v = new Vector();}public void addToChorus(Animal ...
2605 byte By
Hal@a at 2007-9-30 2:22:20
HelloThis applet is basically a number guessing game. It uses a random gen for a number the user is supposed to guess.I'm wondering if my number generator is causing too large a number for what I need. Because it always says my number I input is too small. I want a number between 1 and 1000. ...
2430 byte By
reyes99a at 2007-9-30 2:22:15
I am new to Java and I am trying to create a window with the fhe fields starting at gridx=0 and gridy=0 but I get the fields centered in the middle of the window. Is there a problem with my code?ThanksRalphimport javax.swing.*;import java.awt.*;public class SwingWindow extends JFrame{ private ...