32,199 Topics
| |
[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" ) … | |
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 … | |
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; … | |
[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] | |
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. | |
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 … | |
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] | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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: … | |
I want some projet title in java for mca... Pls help me,,, | |
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.*; … | |
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 | |
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 | |
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); … | |
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 … | |
[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 { … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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? |
The End.