32,199 Topics

Member Avatar for
Member Avatar for betny

[CODE]public void readArguments(String[]args ) { String [] readArray = new String[ 10 ]; Scanner readscanner=new Scanner(System.in); // read values from keyboard into array System.out.println("Enter your arguments or type Exit to exit the loop"); for ( int i = 0 ; i < readArray.length ; i ++) { if(readArray[i] =="Exit" ) …

Member Avatar for hfx642
1
226
Member Avatar for dayghost

So, I've created a game. I want it to connect to a database to get some information. This is the problem I'm getting the console. [code] com.mysql.jdbc.CommunicationsException: Communications link failure due to under lying exception: ** BEGIN NESTED EXCEPTION ** java.net.ConnectException MESSAGE: Connection refused: connect STACKTRACE: java.net.ConnectException: Connection refused: connect …

Member Avatar for dayghost
0
240
Member Avatar for wonder_laptop

Dear All, i have been tugging my hair out for 3 days and i cant find the problem !!! im writing a code in Aglets, i have to classes, Master and SayItAglet [B][U][COLOR="Green"]Master.Java[/COLOR][/U][/B] [CODE]package simple; import com.ibm.aglet.*; import java.net.*; public class Master extends Aglet { private AgletContext thisContext = null; …

Member Avatar for ahmed0725
0
221
Member Avatar for betny

[CODE]public int countArguments( String args[] ) { logger.debug( "In countArguments(..)" ); String [] readArray= new String [10]; for ( int i=0; i<readArray.length; i++ ) { for(int count: readArray){ count=count+i; System.out.println( "Number of arguments = " + count ); } } }[/CODE]

Member Avatar for Vaspar
0
101
Member Avatar for AhmedGhazey

Hello Guys I ask if any one can help me i have to write application which record video from webcam , but I don't know where I must search ? can you help ? just suggest where I should read . Thanks.

Member Avatar for Bladtman242
0
106
Member Avatar for thompsonSensibl

Hi, could someone give me some idea of [B]how I can be more EFFICIENT.[/B] Basically, it is some[B] kind of a Knapsack problem[/B]. But the number of items can be in the 100000s, and my solution caters to only around 5, I think. ------- [U]The story / circumstance:[/U] A thief …

Member Avatar for NormR1
0
94
Member Avatar for lsvife

could anybody help me.I got error java.lang.IndexOutOfBoundsException when i press edit button.. this is my code: [CODE] String stredit=""; System.out.println(foodselected.size()); for(int m=0;m<foodselected.size();m++) { if(foodselected.isSelected(m)) { foodselected.delete(m); stredit=foodselected.getString(m); break; } } int qtyint=Integer.parseInt(stredit.substring(0,3)); String namestr=stredit.substring(5,stredit.length()-12); System.out.println(qtyint); System.out.println(namestr); namecust.setString(custname.getString()); tableno.setString(txtno.getString()); fooddrinkname.setString(namestr); txtqty.setString(Integer.toString(qtyint)); frmedit.append(namecust); frmedit.append(tableno); frmedit.append(fooddrinkname); frmedit.append(quantity); frmedit.append(type); frmedit.addCommand(ok3); display.setCurrent(frmedit); display.setCurrentItem(custname); [/CODE]

Member Avatar for lsvife
-1
127
Member Avatar for buba_kazouba

i wanted to create a gui java program that reads info from MySql then output it in a JTable. but i first tried to use the JTable because it was my first time to use it. It worked perfectly but when i tried to read from the database it doesn't …

Member Avatar for buba_kazouba
0
213
Member Avatar for djbuclkle

Hey all just wondering of someone can give me an explanation of what a Raw Type is in generics. I've been looking all over and can't find a good explanation of what it is. Thanks

Member Avatar for NormR1
0
45
Member Avatar for laguardian

Hey guys! I need help... I have a text field and table that I made on NetBeans. I'm working on GUI. Anyway, in this text field, the user inputs his/her name. And the user's name is displayed on the "User 1" heading of the table: [code] jTable1.setModel(new javax.swing.table.DefaultTableModel( new Object …

Member Avatar for laguardian
0
2K
Member Avatar for arpandixit

hi! i am trying to build an application which will recognize speech and convert into text.For that i have installed jdk 1.6, Apache ant 1.8, sphinx4-1.0beta3-src and also set the paths etc. i am able to run the demos like given in C:\Program Files\Java\sphinx4-1.0beta3-src\sphinx4-1.0beta3\bin\HelloWorld.jar using java -mx256m -jar bin/HelloWorld.jar which …

Member Avatar for modistm2
0
813
Member Avatar for sathya88
Member Avatar for Johnstep

Hi guys, I need some help in this exercises here are the given problems. A. Create a program using arithmetic operators. Use JOptionPane for input of any four variables. B. Create a program using relational operators. Use java.util scanner for input of any three variables. C.Create a program using Logical …

Member Avatar for Vaspar
0
149
Member Avatar for abelingaw

I was just wandering if someone could help me how to redo a case statement. After executing the program, there would be a line asking : Try Again? YES / NO If yes, then the program re-executes without hitting F5 again. (using JCreator pro 5). All i have is this: …

Member Avatar for Vaspar
0
147
Member Avatar for gvsubhu
Member Avatar for D3X

Hi guys, what im trying to do is have a transfer function so that say for example i can transfer $100 from Johns account to Jacks account. Below is the code for the AtmDataFile Class and the ATMTransfer class.I would greatly appreciate some help on this project =). [CODE]import java.io.*; …

Member Avatar for D3X
0
4K
Member Avatar for yumyam09

Someone here knows how to make a java programming to make other computer turn on or off??with a scheduled time in database?? anyone show me how please

Member Avatar for JeffGrigg
-1
78
Member Avatar for lena1990

hi i am working in project in java i have data that i want to display in jtable but only the data is appered but the column names do not apper

Member Avatar for Majestics
0
121
Member Avatar for Majestics

I HAVE TRYING SPLASH SCREEN IN MY APP, BUT CANT GET THE BASICS YET.. SPLSAH SCREEN ISNT WORKING, CAN ANYONE GIVE ME A SIMPLE EXAMPLE hERE is my code. [CODE] import java.awt.Graphics; import java.awt.Image; import java.awt.Toolkit; import javax.swing.JWindow; public class introduction extends JWindow { private Image img; introduction() { setSize(128,128); …

Member Avatar for Majestics
0
181
Member Avatar for Scicluna

Hello! I am trying to create a simple register/log in menu which allows users to enter the system using that username and password. I have already created the 'Register' section but I have difficulty linking it with the Username and Password in the 'Log in' section. Do I have to …

Member Avatar for Tellalca
0
441
Member Avatar for betny

[CODE]/* * @author BChepkwony * Created on 10 August 2011 */ package com.jjpeople.mainmethod; import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Logger; import java.util.Scanner; import java.util.Arrays; /** * MainMethodExercise demonstrates how you can pass in arguments into the * application. * * @author BChepkwony * Created on 10 August 2011 */ public class MainMethodExercise { …

Member Avatar for betny
0
385
Member Avatar for jhopwood

The Java code I am writing is required to have the first, next, previous, and last buttons, and my program still needs to sort. I believe there is something wrong in my codes for each button. I currently have this (of course with each "" for each button. Any ideas …

Member Avatar for Majestics
0
7K
Member Avatar for laguardian

I'm currently working on a project for my JAVA class. The user picks, from a two dropdown boxes, the times he is busy (military time). And at the bottom of the form, there is a table which displays the times he is busy, and the tables arranges the times from …

Member Avatar for mKorbel
0
120
Member Avatar for thanatos1

hey guys, i've been designing and coding a pokemon-clone game in java for roughly 3 months and i've a huge problem in my hands. how the hell am i supposed to design a "map" in sprites? for example, i've been reading "developing games in java" and it just gives me …

Member Avatar for NormR1
0
121
Member Avatar for jhopwood

I am having some issues with my Inventory Program and could use some help. I had the program working last night where my GUI would display the correct categories but today when I tried to get the restocking fee to add in to the value, I seemed to have messed …

Member Avatar for NormR1
0
661
Member Avatar for sciprog1

Hello Members, I am looking into using Java to be able to model/simulate (MODSIM) discrete and continuous systems in the areas of traffic modeling, birth/death process, spread of disease etc. I have a working knowledge of Java. I have a good grasp of calculus and differential equations. I am looking …

Member Avatar for hfx642
0
161
Member Avatar for beginnerJavaer

Hi, I am trying to create a Client/Server application...when client is initialized it reads a file line by line and sends each line to the server which does some sort of action to the line (in my code it capitalizes the line) and writes it to a file. I have …

Member Avatar for Aviras
0
254
Member Avatar for taurian2702

Can someone please help me for providing value from asp in to javascript function? I want to use "$('#countdown').countdown({until:$.countdown.UTCDate(+12, 2011, 9 -1, 5), format: 'DHMS', layout: " and where you can see the numbers, i want use value which i have retrieved from database.

Member Avatar for Golden-Boy
0
92
Member Avatar for Pytho

Hi all I've tried to find out which object is behind the JLabel that caused the MouseEvent. I have a code like this. [CODE]for(int i = 0; i < annetutKäsikortit.size(); i++) { URL _kuva = this.getClass().getResource("/kortit/" + annetutKäsikortit.get(i).haeNumero() + "_pieni.png"); käsikortitJLabel.add(new JLabel(new ImageIcon(_kuva))); käsikortitJLabel.get(i).addMouseListener(hiirenkuuntelija); omatKortit.add(käsikortitJLabel.get(i)); }[/CODE] Sorry about that strange …

Member Avatar for JamesCherrill
0
165
Member Avatar for Ashley256

hi i want to create a batch file that will execute the diffrent java file i have as one single application. where do i start?

Member Avatar for NormR1
0
66

The End.