32,204 Topics
| |
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. … | |
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 … | |
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] … | |
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{ … | |
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() … | |
Hi, Do anyone know a memory leak profiling tool compatible for java 1.4.2. Your help is much appreciated. | |
What’s the point of having a private constructor? | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
(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' … | |
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 … | |
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. | |
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 … | |
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). … | |
hi how to i create a a local HashSet<video> and an InventorySet | |
i want to divide a matrix of n x m in smaller equal sized square matrix of size p x p.. | |
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 | |
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. | |
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 … | |
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'); … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … |
The End.