32,204 Topics

Member Avatar for
Member Avatar for PhiberOptik

Hi Folks, I am having difficult with a program. I have a program that downloads a file to the directory it is being run from and I need to move it to another one after its done downloading. I found code that should do it but it keeps failing, and …

Member Avatar for naugiedoggie
0
128
Member Avatar for jollyton12

Hey guys, I am doing my game project but i get this error everytime i press high scores button...can any one explain what this error means? Thanks in advance :) j Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1 at HighScoreManager.readHighScores(HighScoreManager.java:22) at StatusView$1.actionPerformed(StatusView.java:71) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at …

Member Avatar for jollyton12
0
452
Member Avatar for Mubo

Hi guys , i am a to programming and have to do little code as an excercise, but got little confuse about constructors and objects while compiling my programm. forexample i created an object of a class called AsciiImage; in the Main class public class AsciiReader{ public static void main(String …

Member Avatar for Mubo
0
80
Member Avatar for skiing

Here is what I am trying to do I am trying to compare to values that are set up as generic values and return whether one is greater than the other and it is telling me that (E, E) cannot be applied and I don't know why. I would appreciate …

Member Avatar for Antenka
0
104
Member Avatar for Olsi009

Hi, I am trying to write a program in Java and I am having a problem with a small part of it. I am using a JLabel to display an image. The JLabel is added to a JPanel with fixed width and height. But the problem is that the image …

Member Avatar for nmaillet
0
71
Member Avatar for Olsi009

Howdy, I am trying to write a simple program in java that creates a database with some tables and adds some data, but I keep gettin this error: [CODE]java.sql.SQLException: No database selected[/CODE] I am posting the code below, it's really easy to understand. Please HELP!!! I am new at mySQL …

Member Avatar for Olsi009
0
155
Member Avatar for kbullard516

Alright, I'm trying to import data from a text file into an array, the data represents different properties of buildings that are to be drawn on a panel. I have 3 classes, Building3 which represents an individual building, CityPanel3 which represents the panel that the buildings are drawn upon (also …

Member Avatar for hkansal
0
133
Member Avatar for stevnlon

Hi, im trying to get code that if seats are availabile on a bus, then a passenger may get on. For the code i have provided, when i run it ,passenger gets on at the correct stop, but never get off.....i.e. the first 2 passengers ride forever........ help! what am …

0
70
Member Avatar for shadowson1

Ok...The assignment is to create a mortgage calculator with a GUI that asks for the principle amount, has a drop down box that allows the user to select an interest rate and term (ie 7-yr at 5.35%) and displays the informat, payment, and an amortized payment schedule...I beat my head …

Member Avatar for peter_budo
0
151
Member Avatar for kiwicas

Hi, I'm not sure if this is the right forum but.... I'm doing a project for college which involves Learning Content Managemnt System. I've developed a few features for this including chat, forums, etc. I want to develop an SMS system to use in conjunction with the chat application ie. …

Member Avatar for simmer
0
130
Member Avatar for onemanclapping

hi, I have to do a program that generates 'n' different combinations of 7 different numbers between 1 and 49, so I did this: [CODE]import java.util.*; public class Totoloto { public static void main(String[] args) { System.out.print("Quantas apostas?"); Scanner s = new Scanner(System.in); int n=s.nextInt(); int[][] apostas = geraApostas(n); for(int …

Member Avatar for onemanclapping
0
155
Member Avatar for trombadorez

He wants to input in the program an undefinite number of (numbers like 1, 2 etc), all positive. With that done he wants the program to randomize these numbers and show them one at a time in a random distribution. i thought it was easier when he asked but i …

Member Avatar for BestJewSinceJC
0
81
Member Avatar for itslucky

Hi, my Dear Friend i have created a Chat GUI application in java, now i want to change the look of my GUI application, for example like Yahoo or MSN messanger... please help me to do so... very very Thanx in Advance...!!!

Member Avatar for peter_budo
0
178
Member Avatar for curtissumpter

I wrote this simple java program to test the repaint mechanism in Java for my Eclipse IDE (not that it works on XCode either). The repaint() mechanism is not repainting, it does not erase the code previous to it in the graphic. It should according to everything I've read. Help …

Member Avatar for toucan
0
3K
Member Avatar for aztos

Hi, I'm working on creating my first game to sharpen my programing skills and as a great learning experience for programming in general. I'm using private ints for the stats and was working on get and set methods for retrieving them and changing them and I was wondering if anyone …

Member Avatar for JamesCherrill
0
68
Member Avatar for Twitty25

Hello everyone! I'm a Java newbie and I'm trying to create an applet that will draw a graph to find the roots of a cubic equation y = ax^3+bx^2+cx+d. The user has to input the range and the values of a, b, c and d. I've done the layout but …

Member Avatar for VernonDozier
1
2K
Member Avatar for neutralfox

Hello, I am having a null pointer error, don't know where it came out. Can someone check this code for me please: The error is in the sendBytes methods, I have put a comment over there, actually there are two null errors. 1. [code] pw.println(filenm);[/code] 2. [code]out.write(buffer,0,bytes);[/code] Thanks a lot …

Member Avatar for ~s.o.s~
0
196
Member Avatar for number87

ok so I need to use a 2d array to draw a hangman picture for a hangman game. the picture should be something like this ============ |<space>| |<space>O |<space>/|\ |<space>/\ | | but when i run this code with main. i get this = = = = = = || …

Member Avatar for JamesCherrill
0
245
Member Avatar for mashimaro

Hey, got a problem with connecting to some ldap's. [CODE]Hashtable data = new Hashtable(); data.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); data.put(Context.PROVIDER_URL, "ldap://" + host + ":" + port + "/"); data.put(Context.SECURITY_AUTHENTICATION, "simple"); data.put(Context.SECURITY_PRINCIPAL, "cn=" + username); dane.put(Context.SECURITY_CREDENTIALS, password); DirContext ctx = new InitialDirContext(data);[/CODE] I can connect to SUN's ldap using this, but there are …

0
45
Member Avatar for yamster

i wanna know if its possible to set one of my JPanels as my background ?? i have been googling up all day n i only find dat u can attach a .gif as ur background or juz plain colour but haven been able to find anything on this... please …

Member Avatar for JamesCherrill
0
97
Member Avatar for ktunisia

Hi to all I need some help to write a java program to parse 2 text file one containing the details of the database and the other the data that will be used to insert in the tables of the database A sample for the first file : schema : …

Member Avatar for ktunisia
0
108
Member Avatar for f.damati

I want to make a server (FTP) client in which the client request a photo from the server i can't find any reference that teach that i need a simple one since i am a beginner Thank you

Member Avatar for Ezzaral
0
103
Member Avatar for ravikiran032

[B]chnamsv ,chprtsv , hostent ,ifconfig ,mknamsv ,no ,rmprtsv [/B].... where all these tcp/ip commands are implemented.Is there any programming language that implements these commands or any network tool that uses these commands. please suggest me....

Member Avatar for masijade
0
77
Member Avatar for get2tk
Member Avatar for neha_p

hey, I have done my bachelors in Electronics (B.E in electronics)and was working in IT comapany in asp.net,VB .for 6 months.now i want to shift to java,j2ee . i now have to show 1 year experience in java ,j2ee but can u please help me as too wht should i …

Member Avatar for verruckt24
0
94
Member Avatar for k2k

hi, i have a JFrame... one menuBar placed on a JPanel.. and then two JPanel with different things (let me call them ActionPanelOne, and ActionPanelTwo). i put the JPanel (with JMenuBar) North of the JFrame, and menuIteam will call the 2 ActionPanel individually to come up. my problem is: Once …

Member Avatar for k2k
0
179
Member Avatar for nightGoddess

Ok so here is the problem: i am working on a code that will read a date from the keyboard in MM//DD//YYYY format. and then determines if it is a valid date or not. So far I have gotten: [code] import java.util.Scanner; /** * Program: UseCheckDate * File Name: UseCheckDate.java …

Member Avatar for nightGoddess
0
117
Member Avatar for ppushpa

i have a file like a1 0.7 a2 0.5 b1 0.6 b2 0.8 a2 0.4 b3 0.6 a1 0.3 a2 0.4 a3 0.7 i want to read a file data and add values if it has same variables.Ex; a1=1.0 a2=1.3 a3=0.7 b1=0.6 b2=0.8 b3=0.6 whats the concept used to done …

Member Avatar for Ezzaral
0
66
Member Avatar for Nperic

Hey there, I am just a little confused with the code below, i parse the XML file although i cant call functions from outside the main. My programming isnt really up to scratch. Ive had a long break so now im paying for it :( Any help/ suggestions would be …

Member Avatar for Ezzaral
0
135
Member Avatar for redmaverick

I am unable to execute these codes. This code is a replica from a website. I used Testing.java and Person.java. Should the files be named comparable.ex01.Testing.java and comparable.ex01.Person.java? As I am pretty new to java I have this doubt. [CODE] package comparable.ex01; import java.util.Arrays; import java.util.ArrayList; public class Testing { …

Member Avatar for Ezzaral
0
121

The End.