36,051 Topics

Member Avatar for
Member Avatar for jaden403

I have a basic Java file I/O question. I am trying to read/write from/to a text file (obviously) from within a function that is called by main(). Can you do the following within a function: [code] Scanner inFile = new Scanner(new FileReader("File1.txt")); PrintWriter outFile = new PrintWriter("File2.txt"); [/code] or does …

Member Avatar for jaden403
0
126
Member Avatar for MNR

Hi, I have to make a snake game. i need an array to store allposition of the snakes body. i will also need a variable to store the number of parts in the snakes body. I know that i have to use the number of parts ++ but i dont …

Member Avatar for iamthwee
0
642
Member Avatar for PPaul1

I'm trying to show the balance and interest paid for each month. The balance should go down with each loop until balance is paid in full. The balance will go down but with the wrong amount I don't know how to put an loop in here that will say balance …

Member Avatar for masijade
0
167
Member Avatar for NPatty

<code>Does anyone know how do I go about getting user's responces once they've entered their responce into a prompt box & assign it to a variable, to utlimately use their responces to concatenate it with other strings to make a sentence. I'm just having trouble assinging user's input to be …

Member Avatar for masijade
0
94
Member Avatar for crestaldin

[COLOR="Navy"]Hi everyone, I'd like to know if anyone can give me any idea(s) or resources to help me with a project I'm working on. I am creating Email agents using SMTP and IMAP protocols.I have been able to work on the SMTP part, however, I'm having challenges writing the codes …

0
91
Member Avatar for jeffrey296

Hello to anyone who can help me. I'm a freshman in comp sci and here is my problem: I need to have the user type in a number in a JOptionPane input box, and I need to change the number they input into a double. Here's what I have, it …

Member Avatar for cms271828
0
138
Member Avatar for hemanthjava

[code]/* Java Swing Calculator */ import java.awt.BorderLayout; import java.awt.Color; import java.awt.Container; import java.awt.FlowLayout; import java.awt.Font; import java.awt.GridLayout; import java.awt.Window; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JPanel; import javax.swing.JTextArea; public class Calculator extends JFrame …

Member Avatar for cms271828
0
169
Member Avatar for iamthwee

Hi people, I am having trouble with my splash screen. Basically, it just flashes really quickly and I can't get to to pause for long enough. See attached file. I've attached my program as a zipped file. After you have download it you need to right click and extract it …

Member Avatar for ciprianpascu
0
567
Member Avatar for higherGround574

I have to get an animation to restart once the user scrolls the mouse over the image... I know I have to use MouseMotionListener, what I don't know is how to get the coordinates of the image to do this operation. I'm using GridBagLayout manager, the whole thing runs inside …

Member Avatar for cms271828
0
99
Member Avatar for jeffphotos

Hello- I am creating a puzzle that is like the "Rubik's Cube," although this puzzle is played on the computer monitor, and the puzzle involves images placed on the sides of a cube. The mouse is used to rotate the sides of the cube. Each side of the cube is …

Member Avatar for cms271828
0
136
Member Avatar for silentcreeper

ok I poseted about an assignment that i had to do for my Java programming class. Now i have attempted it and i have kind of gotten it to work but its not working properly ... i have no idea what i'm doing wrong ... please help me fix my …

Member Avatar for silentcreeper
0
119
Member Avatar for crackers8838

Hi, I am new at programming and I have never done Java before. I am in my first Java class and we are asked to complete the following question...[B]Complete the method printLargestAnimal below. [/B]Consider the three Strings "dog", "cat", and "monkey". In lexicographical order, "monkey" is the largest of the …

Member Avatar for crackers8838
0
87
Member Avatar for abhishekG

hi I am facing problem in Threads in java. I have studied threads and know the theory of it. But I just cant get started. It would be great if I can get some sample codes showing the use of wait(), notify(), sleep() . The code should have a number …

Member Avatar for masijade
0
71
Member Avatar for Taps

hello all..I have created ANT Script and need to work along with CVSMy ANT Script shall1. As of CVS extract .ear from this is the common version 2. Extract from CVS and overwrite in target directory the specific components listed in the specific [INSTANCE].Can any one tell me how shall …

0
248
Member Avatar for mikel_2006

Hello Everyone, I am having quite a problem with a program I am trying to get working. I am trying to make a marks tracking program using an array that has an array of strings 3 elements long called Names. Has a 2D array of integers 3 * 2 elements …

Member Avatar for masijade
0
76
Member Avatar for Ajay Raj

Hi all, I have developed and application (midlet), could any one please let me know how to deploy this on the device (mobile device).

Member Avatar for jbennet
0
58
Member Avatar for knittingguy

Hi all, I am having a little problem with regular expression. I have a change password application and I want to make sure the password contains at least one numeric character. The regular expression that I am using is, [a-zA-Z]+[0-9]+|[0-9]+[a-zA-Z]+. If I put in "testing", it would return false, which …

0
59
Member Avatar for Zulfiqarmd

Hi all, I am working on generating CSV month by month for annual report. what I do is just create CSV file initially and append to it every month end. So as to generate annual CSV file in following format: Month 1, Nokia8800, 156.0 Month 1, Nokia3120, 113.0 Month 2, …

Member Avatar for iamthwee
-1
98
Member Avatar for jan1024188

i want to know if there is any difference betwen [URL="http://www.linuxforums.org/forum/#"]java[/URL] and javascript... are they the same thing?

Member Avatar for satyakishore
0
125
Member Avatar for idvikrant

hi.. my name is vikrant..doing b.tech in comp science engg..when i start the jakarta tomcat5.0, it gives me the error that java_home not assigned properly ang gives me the error that unable to find _djava.endorsed.dirs. what is meant by this file..is there anyone to help me

Member Avatar for satyakishore
0
119
Member Avatar for cms271828

Hi, I'm considering making a Connect 4 game in java. I have just completed my chess game (version 1 anyway), [URL]http://www.colin-java.co.uk/JChess/index.htm[/URL] So connect 4 should be a load simpler. However I am uncertain as to which evaluation function to use, does anyone have any experience with this. Thanks for any …

Member Avatar for cms271828
0
135
Member Avatar for pfr

THis program is suppose to read a txt file, contating text with weird spaces( the space on the space bar, character space on keyboard wtv u want to call it).also write the number of spaces in front of each line, and you are suppose to get rid of them like …

Member Avatar for masijade
0
109
Member Avatar for higherGround574

Hey guys, I'm for the most part a backend programmer but I'm taking a GUI class as a elective, and I'm haveing some problems with an applet. Part of the assigment is to create a logo design that displays a bunch of pentagons in a circle with different colors and …

Member Avatar for higherGround574
0
184
Member Avatar for THK

i have to set the time in minutes when this plane is expected to land or take-off. and i have to use method int..:eek: public int setScheduledTime() { } what should i do.... :sad:

Member Avatar for iamthwee
0
114
Member Avatar for silentcreeper

Hi, I have been working on a project for my java programming class but I just dont know where to even start. here is what i was assigned Your program must: [LIST] [*]Not declare any class attributes. You will not need them in a carefully designed class. [*]Read a single …

Member Avatar for Phaelax
0
160
Member Avatar for Untangledup

Greetings, I'm aware of the incorrect rouding that NumberFormat does in Java. We are working with dollars and cents but multiplying the amounts against an "area factor" with four or five decimal places. As a result, the dollar amounts, when returned, come back a penny off due to the rounding. …

0
54
Member Avatar for pamararaj

HI All, Iam invoking a registered SOAP Service with URI 'uri:StartServer' and a method startaService(). I have a SOAP client myClient() which calls the method startaService() in the SOAP class StartServer (registered as uri:StartServer). But my method calls some CORBA functionalities insite the method. SO I need to pass some …

0
68
Member Avatar for javaqueen

I need help..I have an assignement on chapter loops which I dont understand..can someone help.. it start enter number or parts: enter number of chapters: beginning part 1 chapter 1 chapter2 chapter3 chapter 4 End part 1 Begin part 2 chapter 1 chapter 2 chapter 3 chapter 4 end part …

Member Avatar for Rayhan Muktader
0
96
Member Avatar for Gessa

[COLOR=#000000] [/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]Hey guys I’m Gessa Hi I m new, and desperately need HELP [/COLOR] [COLOR=#000000]I recently started my graduate studies where I have to take at least programming two, the last programming class I took was in my associates degree and one in the beginning of my …

Member Avatar for Gessa
0
82
Member Avatar for ChIkEn

Hello, I am looking for a tutor to teach me how to make games in java. Im not technically new to programming, I know the basic syntax from previous programming knowledge, I just need help on what function do what, etc, and any little thing java must have... :p I …

Member Avatar for bharatchhajer
0
827
Member Avatar for THK

public class Plane { private String FlightNumber; private String Location; private boolean isLanding; private int ScheduledTime; private static int TotalPlanes; public Plane(String FlightNumber, String Location){ this.FlightNumber = FlightNumber; this.Location = Location; Plane.TotalPlanes++; } public String getFlightNumber(){ return this.FlightNumber; } public void setFlightNumber(String f){ this.FlightNumber = f; } public String getLocation(){ …

Member Avatar for THK
0
105
Member Avatar for ypsmag

i calling the method to display in web browser using JSP....ii have create the piechart using java code and save it ask JPEG......i just want to use JSP to calling and dispaly the method and display the JPEG pie chart in web browser..... anyone who can help me here i'm …

0
58
Member Avatar for THK

[B]public Plane(String FlightNumber, String Location)[/B] [B]can i use 2 strings ...?[/B]

Member Avatar for THK
0
86
Member Avatar for kings_raghav

Hi,, I'm new to Daniweb and would like to communicate with experts thru my first regards..I need an help. i want to know whether can we get an input in the constructor... Bcoz constructor is used only to initialize.... Pls help me on this.I have just now started to learn …

Member Avatar for kings_raghav
0
82
Member Avatar for MEversbergII

[code]import TerminalIO.KeyboardReader; public class TempConversion { public static void main(String [] TemperatureCalculations) { KeyboardReader reader = new KeyboardReader(); double fehrenheit; double celsius; System.out.print("Enter degrees Fahrenheit: "); fahrenheit = reader.readDouble(); celsius = (fahrenheit - 32.0) * 5.0 / 9.0; System.out.print("The equivalent in Celsius is "); System.out.println(celsius); reader.pause(); } }[/code] I picked …

Member Avatar for AlwaysLearning
0
235
Member Avatar for fdrage

when you have a variable and you are not using it at all in the code... i.e you forgotten about this particular member well in eclipse there is something that indicates that, that particular member is unused... some exclamation mark or something.... my question is, is there such a feature …

Member Avatar for fdrage
0
108
Member Avatar for Gessa

Hey guys I'm Gessa I recently started my graduate studies where I have to take at least programming two, the last programming class I took was in my associates degree and one in the beginning of my bachelor's degree. And need some real help with some code and how to …

Member Avatar for iwlu
0
178
Member Avatar for THK

hi everyone i need some help with java..:sad: [B]Write the definition of a method twice , which receives an integer parameter and returns an integer that is twice the value of the parameter.[/B] and [B]Write the definition of a class Telephone . The class has no constructors, one instance variable …

Member Avatar for masijade
0
387
Member Avatar for j.jennings93

hi my first time on site is ther any one with a diagrem of the electrcal systym they can send down 4 the k reg jawa cz 125 as my son brought me one to restore and somr one as pulled all wires apart under the clock and ignition please …

Member Avatar for masijade
0
38
Member Avatar for beantowner2

Does anyone know anything about Java applets using 100% of the CPU cycles? The only clue I have is that I've been told that MSJVM has problems that Sun's JVM doesn't have. I'd be interested to know whether anyone else has had this problem and fixed it successfully.

Member Avatar for masijade
0
101
Member Avatar for seluru

Hi all, My code is as follows [code] <a href="/web/contacts/contactSearch.jsp">Search</a> [/code] when i click this link, it will go to contactSearch.jsp. I want to send an action to the servlet when clicking this link, and display the data from the servlet on the contactSearch.jsp. The data I mentioned is a …

Member Avatar for seluru
0
280
Member Avatar for mrwan
Member Avatar for THK

You are given a class named Clock that has one int instance variable called hours . Write a constructor for the class Clock that takes one parameter, an int , and gives its value to hours . help me some one :(

Member Avatar for THK
0
224
Member Avatar for iwlu

Here is my program with Pseudo code which is yukville, :lol: but not sure i'm on the right track or have straid, any help would be appreiciated. [B][COLOR=#000000][B]Exhibit A-1: UML Class Diagram of Class Garage[/B] [B][COLOR=#000000]Garage[/COLOR][/B] [COLOR=#000000] [/COLOR] [COLOR=#000000]+openForBusiness()[/COLOR] [COLOR=#000000]-calculateCharges(hoursParked : double): double[/COLOR] Exhibit A-2: Pseudo code for openForBusiness Method …

0
79
Member Avatar for fdrage

I have an algorithm problem with recursion: i have a route from A to D and it looks like this [CODE] [A, B, C, D][/CODE] the alphabet in the above list is an object of a class, lets call that class Nodes each of this Nodes object they have some …

Member Avatar for iamthwee
0
121
Member Avatar for SyLk

can someone explain how i could go about applying this recursive method to a string of integers from a text file. so far i have read the string into an int array in my main using a tokenizer and im unsure of how i should manipulate the array now. also …

Member Avatar for Cudmore
0
125
Member Avatar for freesoft_2000

Hi everyone, I need to ask a rather silly question on escaping quotes so please bear with me for a while. As i am using java this is what i usually do to escape quotes [code] "/"Test"/" [/code] It usually works but my question is that is this a platform …

Member Avatar for Cudmore
0
82
Member Avatar for bimalz

I have around 10-15 computers on the lan and i need to find out the ip address of all the machines. Can anyone give me the java commands or the program to find all the IP address?? :eek:

Member Avatar for peter_budo
-1
73
Member Avatar for salim

am trying to delete a record but I have this message: Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'ProductID = , 1567'. /salem/pages/fresh_food/TMP3rfr35u5pa.ASP, line 74 I looked at the meaning but so far I can't see that …

Member Avatar for masijade
0
77
Member Avatar for freesoft_2000

Hi everyone, I am trying to insert some unicode into a JTextPane document but i have a concern as to whether the unicode will be recognized on other platform besides windows. This is what i did [code] StyledDocument.insertString(TextPane.getCaretPosition(),"\u25CF" + " ", null); [/code] Will my above code be recognised on …

Member Avatar for aniseed
0
95

The End.