32,204 Topics

Member Avatar for
Member Avatar for thes0mething

Hello everyone on daniweb!:) I'm trying to make a programme which will move a picture to the sides when pressing the right or left arrowkeys. I did successfully put a picture in and I was able to change the side coordinates(called "side" in the programme) to make the picture move. …

Member Avatar for Ezzaral
0
1K
Member Avatar for vishalonne

Hi I am writing one simple program for upgrading my knowlegde from C# to Java but I am failed to attach ActionListener to JComboBox which is added to a cell of JTable at run time. Actually I want to perform update operation and delete operation on selecting Update or Delete …

Member Avatar for mKorbel
0
215
Member Avatar for yani.uk

Hello there. I am trying to create a loop, which will move an objects position to a certain spot, based on a random number generator. Here is the code I have so far; [CODE]public void left() { if (this.getColour().equals(OUColour.WHITE)){ while(this.getPosition() !== this.setPosition(this.getPosition() - getRandomGenerator().nextInt(5) + 1)){ super.left(); } } }[/CODE] …

Member Avatar for yani.uk
0
103
Member Avatar for sugir1987

can you help me to clear the error? [CODE]import java.util.*; class Node{ protected Object data; protected static ArrayList child; protected Node next; public Node(){ next = null; data = null; child=new ArrayList(); } public Node(Object d,Node n){ data = d; next = n; n.child=new ArrayList(); } } public class Tree{ …

Member Avatar for NormR1
0
187
Member Avatar for nlyn

I need help in my Connect Four program. Specifically in placing the user's input on the gameboard & also checking horizonallty, vertically, etc. [CODE]/* * ConnectFour program */ import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.Scanner; public class ConnectFour implements ActionListener { JFrame frame; JPanel contentPane; JButton displayMessage; public ConnectFour() …

Member Avatar for Philippe.Lahaie
0
88
Member Avatar for nijinjose123

Hi, Do anyone know a memory leak profiling tool compatible for java 1.4.2. Your help is much appreciated.

Member Avatar for peter_budo
0
123
Member Avatar for clerisy
Member Avatar for Thermalnuke

Hey guys, I am trying to figure out how to write out this java Program, I am using JCreater, and I am teaching JAVA to my self if you guys can help and show me a couple of the programs that I am doing I think i will be all …

Member Avatar for stultuske
0
254
Member Avatar for battlex2010

I am making a networking application using sockets for a local area network. How can i make the client side of the application search the network for the server socket? Right now i am getting the input from the user itself about the IP address and Port of the server.

Member Avatar for battlex2010
0
195
Member Avatar for hbluthi

Hey again. Trying to add elements to a DList, this happens when I try to add the second car (500, Porsche). The whole insert algorithm sucks and am strongly considering trying to figure out a better one. This is what shows up in the console: Enter name of file with …

Member Avatar for hbluthi
0
205
Member Avatar for scheppy

pButtonarray [x] [row].putClientProperty ("x", new Integer (x)); I'm using a version of java that doesn't have method overloading for putClentProperty so i have to type new Integer as seen above, and this all works perfectly now I'm trying to assign a boolean to the array like so pButtonarray [x] [row].putClientProperty …

Member Avatar for scheppy
0
275
Member Avatar for bigredaltoid

Hi guys - I need to write a program that reads in a user-input integer and tells if the number is prime or not. I've written up this code so far: [CODE]class primenumber { public static void main(String[] args){ int num = 10; int i; for (i=2; i < num …

Member Avatar for bigredaltoid
0
160
Member Avatar for karanc

So Im trying to make a Coinstar Simulation and pretty much what it does is it adds up all the money and gives me a total. Im a computer science student learning java for the first time so I'm a bit confused as to what code i should put next …

Member Avatar for Philippe.Lahaie
0
299
Member Avatar for riahc3

(This has to be a Java question as it simply works in a txt with a HTML extension....) I have this code: [code] <html><head><title></title></head><body> <form id='formulario' action='index.html' method='post'> <label>Ancho </label><input type='text' name='ancho' id='ancho'><br > <label>Alto </label><input type='text' name='alto' id='alto'><br > <label>Izquierda </label><input type='text' name='izquierda' id='izquierda'><br > <label>Horizontales </label><input type='text' name='horizontal' …

Member Avatar for riahc3
0
80
Member Avatar for free_dom

Hello! Chrome browser starts a new process for each tab. Every tab named as "chrome.exe" on windows and on linux "chromium-browse". For example: [url]http://www.ghacks.net/wp-content/uploads/2011/01/sys_manage.png[/url] I need to list all tab title names of opened processes. Is there any function which gets title (or name or summary or ...) of a …

Member Avatar for steve_kamlp
0
184
Member Avatar for Jigs28

Hi, i have netbeans 6.0.1 but when i just creat a file it gives error even at the line which comes by default. For example @Remote or javax.ejb i have uninstalled and installed it again than to the previous installtion effects remains as it is.

Member Avatar for Jigs28
0
122
Member Avatar for sfovell

Hello, I am programming for my Robotics team, and I have to write code for a dashboard, including different camera feeds and setting up rows or columns for the different elements. I am quite new to Java, but I gotten through most of it except for the rows. I can't …

0
125
Member Avatar for riahc3

Hey Putting this code: [code] System.out.println("Hello"); BufferedImage bufferedImage = new BufferedImage(620, 420, BufferedImage.TYPE_INT_RGB); System.out.println("Bye"); Graphics2D g2d = bufferedImage.createGraphics(); g2d.setColor(Color.black); g2d.fillRect(0, 0, 620,420); g2d.setColor(Color.yellow); [/code] It throws a java.lang.OutOfMemoryError: Java heap space error not displaying the bye. I dont understand as my BufferedImage is nothing at all (simple 620 by 420). …

Member Avatar for riahc3
0
1K
Member Avatar for krishnisilva
Member Avatar for krishnisilva
0
92
Member Avatar for mneha67
Member Avatar for mneha67
0
2K
Member Avatar for CodeJava1

hi could someone help me in giving a tutorial in learning how to write testcases in java. would preffer in netbeans if eclipse dosen't matter, thanks in advance

Member Avatar for krishnisilva
0
338
Member Avatar for creative_m

I wonder why they use private constructors.when I was navigating java documentation I found alot of classes with private constructor.Would you tell me what are the benefits of writting them.

Member Avatar for creative_m
0
470
Member Avatar for vinnyoodles

Hi, I am trying to make a simple snake game, but whenever I try to attach a body piece it appears randomly on the screen rather than behind the head. Also, the body doesn't exactly follow the head either. I checked the code over and over for any problems but …

Member Avatar for cms271828
0
294
Member Avatar for imsinu

can we pass condition of if statement as an argument in any language????????? [CODE]class Matrix { static void loop(char a,char b,char c) { int a[][]=new int[3][3] ; byte i,j ; for(i=0;i<3;i++) { for(j=0;j<3;j++) { if(a b c) System.out.print(a[i][j]+"\t"); else System.out.print(" "+"\t"); } } public static void main(String ar[]) { loop('i','>','j'); …

Member Avatar for JamesCherrill
0
4K
Member Avatar for SasseMan

Hi! I'm looking for a way to only run a few tests instead of all existings JUnit test cases in our automated build, which uses ant. I can't add @ignore annotations in the code since it would take to much time. Is there a way to define which test cases/classes …

Member Avatar for SasseMan
0
219
Member Avatar for webdragon89

I have the code to print prime numbers but I can't figure out how to print the numbers 8 to a row. This is because I have to find all the prime numbers <200. [CODE]import java.util.Scanner; public class PrimeNumbers { public static void main(String[] args) { Scanner input = new …

Member Avatar for hiddepolen
0
638
Member Avatar for cloud02

okay so we have group program and my job was to make it only fool proof which I've done most of it and now my group wants me modify/change the program that we talked about and they chose me to do it even though I Said no and I can't..a …

Member Avatar for cloud02
0
190
Member Avatar for ananyaholla

hello, all I am trying to insert rows from Excel sheet into SQL database by browsing Excel file in java(JSP). I can insert rows using ODBC connetion. But using odbc user should give DSN in program. I need to insert rows by Browsing file to make it user friendly.i.e user …

Member Avatar for peter_budo
0
584
Member Avatar for sam1

hi, I heard there is a plugin for eclispe that you can use to produce the gui part of application, but i dont know the name. has anyone used it? is it easy to work on then writing the gui yourself? thanks

Member Avatar for peter_budo
0
160
Member Avatar for abhijeet P

hello all, I am new to J2ME development rather this is my first code i have written in J2me for encryption and decryption using bouncycastle . It is giving the error which i am unable to find solution for... plz help... :sad: This is the error it is showing in …

Member Avatar for abhijeet P
0
361

The End.