31,001 Topics

Member Avatar for
Member Avatar for Meldroz

[b][size=2][color=#7f0055]hey guys i need some help, i posted my assignment and also the code i have so far, i'm almost done i just don't understand how round robin part works. Write a fully documented class named Simulator that contains the main method that will simulate the system. [b]Your method should …

Member Avatar for BountyX
-1
217
Member Avatar for elna

[size=3][font=Times New Roman]Could anybody please tell me what is the advantage of declaring variables to be of an interface rather than class type?[/font][/size]

Member Avatar for BountyX
0
151
Member Avatar for Ron

I am very new to Java and I'm trying to write a Java program to read a ASCII text file, modify a field and save it. I'm not sure how to create the file definition so I can break out the individual fields. The records and fields are all fixed …

Member Avatar for Meldroz
0
163
Member Avatar for cody_e

I need to loop the one sound so that the timer will make it so the sound will play then delay 5 seconds and then play again. My source code is: import java.awt.*; import javax.swing.*; import java.applet.AudioClip; public class Morning extends JApplet { private AudioClip rooster; private final int dealy …

Member Avatar for RC_Razor
0
143
Member Avatar for vyntage

I can't seem to get my applet running...Pls help me look at my source code: import java.awt.*; import javax.swing.*; import java.applet.*; public class ChineseHoroApplet extends JApplet { protected final static String names[] = { "Year of Birth", "Month of Birth", "Day of Birth" }; protected JLabel labels[]; protected JTextField fields[]; …

Member Avatar for xlogan777
0
625
Member Avatar for Bob4life2000

Ok please excuse my idiocy but, If I want to create an array of random sayings of mine, and then everyday call a new one randomly to be placed on my desktop how would I go about it? I am running windows XP

Member Avatar for CodeMasterFlex
0
110
Member Avatar for kait

Hi, I need to import a file with strings and integer values, and use each word i import as a seprate variable. I thought of using String Tokenizer to separate the words and make them 'tokens' but im not sure if that will make them variables and if it will …

Member Avatar for CodeMasterFlex
0
169
Member Avatar for Turbo

HI I have written a program that reads text from the input file and writes the text to the out put file. Im using the StringTokenizer to count the number of words in the input text file. The problem is that it reads only the first line but it does …

Member Avatar for Turbo
0
190
Member Avatar for samtrephin

Hi, I am new to this forum..I need to know 1. if theres a DLL equivalent to xerces.jar 2. equivalent C# class to the CharToByteCoverter.java in sun.io package Thanx Sam

0
95
Member Avatar for numballs

okay, here's the deal. I'm still quite fresh to programming. My task is to create a program, that can draw any number of balls, and then make them bounce across the canvas. The part of the task I am stuck on is converting convert a method that draws two balls …

0
75
Member Avatar for cbek

I'm working on this assignment ..... - Opened up a RandomAccessFile - Looped through the file, using a counter (int i) to find the number of entries in the file - Initialised array using int i - Read data into the array, line by line However, I cant work out …

Member Avatar for Paladine
1
78
Member Avatar for mclam

Determine what kind of hand of poker, the five cards are. For instance, if I have the following: Ace of Hearts Two of Diamonds Two of Clubs 10 of Spades 10 of Diamonds You would print out: Two Pair In general, a poker hand can be the following: 1 Pair …

Member Avatar for oberoc
1
166
Member Avatar for inachu

Now ever since he did this no applets run. OS is Windows XP Pro SP1(reapply sp1?) Would anyone know where to change this in the registry? I checked in HKEY local machine and also HKEY Local User. Both are set to 1 which means its enabled... Because of the custom …

0
101
Member Avatar for MyrrhLynn

Ok here is a program I am working on for an assignment. import java.io.*; public class Copy { public static void main(String[] args) throws IOException { File inputFile = new File("p1.txt"); File outputFile = new File("p2.txt"); FileReader in = new FileReader(inputFile); FileWriter out = new FileWriter(outputFile); int c; while ((c …

Member Avatar for Dynam1cz
1
490
Member Avatar for Bob4life2000

Hello, I have been working with Java for appox the last six months but I still am very un-sure of myself. I need help figuring out how to import one Java file to the current one running. I am using Jcreator LE as a source editor/compiler and I wish to …

Member Avatar for Bob4life2000
1
148
Member Avatar for antaeus

/** * Compares an artist string to this CD's artist to check if the * two strings match exactly (ignoring case). * * @param otherArtist An artist's name. * @return true if otherArtist and artist variables are the same * ignoring case (String comparison). */ public boolean equalsArtist( String otherArtist …

Member Avatar for Iron_Cross
0
140
Member Avatar for Bob4life2000

Okay in case anybody was wondering I solved the class call problem. Now I am trying to create a file for Enemy characters that will store appx 100 different Enemies and depending on the level of the main character apply different stats to those enemies along with a randomly selected …

0
110
Member Avatar for stariq

[url]http://www.cs.toronto.edu/~gfb/csc148/2003F/a2/[/url] is it that we've to make arraylists and then link them or ceate linkedlists nad in them create arraaylist and link linkedlists. please let me know if sample code just how to get started appareciate tht thanks a lot!

-1
127
Member Avatar for cmazurk

I'm looking for a Table of Contents JAVA script that allows 3 different images. #1 the "off" image #2 the "hover" image and #3 the "selected or clicked" image. I have script that allows me to do rollovers, I'd like to expand it so when an image is clicked on …

0
94
Member Avatar for spikes

Hi All, Can any one give me the code for closing a browser window. [code] function closewindow() { if (newwindow && !newwindow.closed) { newwindow.close() } } <input type="button" value="close" onclick="javascript: closewindow()"> [/code] this is what i have and it dont work. also, just a point, the first time i used …

0
97
Member Avatar for spikes

Hi All, i am using a combination of php and javascript on a current project, but i have got stuck. bellow is a sudo code page to try and explain what i am doing <js> function = newwindow() </js> <form> <?php echo field1> <?php echo field2> <inputtype=checkbox> onclick = submit …

0
95
Member Avatar for ragzz

Hi, I am doing Master's in Computer Science. I am trying to upload my applets made in Java 3d on web but I want all the users to see them even those who don't have Java, JRE, or plugin. Please help. Anurag

Member Avatar for Tekmaven
0
551
Member Avatar for red_evolve

Hi..I've been searching all around to find out whether I could submit an entry in a JTextField by clicking a separate button created (say, a "submit" button). It seems that, the value entered in the text field will only be appended if I press the Enter key. Can someone please …

Member Avatar for red_evolve
0
183
Member Avatar for whasian85

Does anyone know where I can look at code for checkpinting Java applications? Any info would be very helpful. thanks.

0
91
Member Avatar for theQube
Member Avatar for red_evolve

Hi, there! Anyone mind lighten me up on the above subject? I am currently developing a simple game in java. So I was in the process of deciding whether to use an applet or application to present it.

Member Avatar for red_evolve
0
171
Member Avatar for theQube

Hi. I'm in a Java class at harvard, and they gave us this assignment to create a function moveKiloMile(); , which moves an on-screen robot 1000 units. We can declare the function by using a function moveMile(); , which moves the robot 8 units. Below is the code that I …

Member Avatar for Dani
0
670
Member Avatar for Jedi

Hi im a newbie here!I wish to build a music website based around emec'in (MC'in)!The game would b built in2 the site! There r 3 wayz MCz can battle online: 1)Vocally!(MCs rap to the music over a mic)(I dont plan on doin thiz 4 my site yet) 2)Forum(MCz post thier …

Member Avatar for Jedi
0
288
Member Avatar for Mazon

I have CodeWarrior v7.0, an IDE for C++ and Java. I can get the C++ functionality working, however whenever I try and begin a Java project it gives me an error saying "Couldn't generate source code because Java Virtual Machine could not be started." I've installed the latest versions of …

Member Avatar for lohengrin332
0
214
Member Avatar for Ben Martin

first post! hello all. :) i'm in the process of converting some vbscript into jscript at work, and not being an expert when it comes to any sort of javascript (or c syntax generally) i am now stuck. specifically with the 'switch' statement. the application is a server-side api that …

Member Avatar for Ben Martin
0
282

The End.