32,199 Topics
| |
How to let the button set to it "latest" text because i suppose to set the button's text to "booked" and the foreground to red. However, everytime i re-run the program, the button re-set. I know i should do something on constructor, but how? Here is my coding.. Thanks for … | |
Have written code for a game, a letter is randomly choosen by the programme and then the player has to pick the same one with the sequence getting longer and longer, the choosen letter is added to an arrayList for the game and then when the player picks a letter … | |
I am creating a Pool.java code for class final and all we need to do is to create a program that calculate the volume of the pool after the user enters the size of the pool. I have only one line where my code is giving me a error. The … | |
In the below code, iam calculating the time taken to calculate the Square Root of first 30000000 numbers. But there is a weird thing happening: [CODE] import java.util.*; public class Cache { public static void main(String args[]) { for(int j=0;j<=1000;j++) { ; } float[] a = new float[30000000]; long as … | |
Dear All, I am using an adapted code from the web for sending sms via gsm modem. Now I would like to modify to read sms message from database table and send it.So I would like to programme it to read on every 30 second from the db process and … | |
I've changed some of the code but the animation plays when you keep pressing the space bar. I want it to animate my bullet across the screen just by pressing the space bar(not by pressing the space bar mulitple times). Thank for your help! *Note: the old code was posted … | |
Hello. I am having trouble with my menu and buttons (which are just pictures that change when you scroll over them). One of my buttons works perfectly, but when I coded the rest in the same way (at least I think so) they dont work. Sorry for the long code. … | |
I imported a picture onto another picture and I am wondering how to get rid of the white around the smaller picture. | |
when the space key is pressed then the menu apears, but when you press the resume button (cont) then the menu should dissapear, but it doesn't. please help. Thanks [code]// The "ArrowKeys" class. import java.applet.*; import java.awt.*; import java.awt.event.*; public class ArrowKeys2 extends Applet implements KeyListener, Runnable, MouseListener, MouseMotionListener { … | |
hi. im doing an edge detection which will detect edges of each RGB channel and then combine them to show it as a final output. im now having a problem with combining the three as it doesnt show me a binary image, instead it has some colors on it. i … | |
hi.. I don't know why the circle doesn't move .. [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; public class MouseGameV2 extends JFrame implements MouseMotionListener { CircleClass a[]; Graphics gx; int m = 5; Thread move1; //---------------------// JPanel p1 = new JPanel(); JPanel p2 = new JPanel(); JPanel p3 = new JPanel(); … | |
Hey This might sound like a dumb question but I simply dont know how to do it. Not only that but for some reason I do not know, my professor refuses to teach me how to use debugging and watch variables. He wants the "change, try, and test" method.... I … | |
Can anybody tell me why I keep getting this error? [CODE]Asig02_Attempt2.java:37: <identifier> expected public void sincronizarCanal(canal)[/CODE] Am I mixing a [I]class [/I]with a [I]method[/I]? This is just a small program that simulates a TV. I'm trying to pass a number (chanel) to a method that tells the user that they … | |
I want to implement gabor filter in java. I got gabor filter code in Matlab. i tried to convert it into java but it had some mistakes. pls check the code and fix the errors. i post both the matlab code (which i got) and java code which i had … | |
I have this code which sorts any given number to ascending order, but I'm having difficulties figuring out how to sort the numbers given into a descending order. Code: [CODE] import javax.swing.*; import java.util.Arrays; public class sort7 { public static void main(int[]array) //public static void main(String[]args) { String str1=""; String … | |
Hello Guys, Im having a bit of a problem here. Im trying to deploy an EJB project that i developed using Eclipse Galileo Version 3.5.2 using JBOSS 6.0.0.Final as server. When I try to deploy my test EJB its giving me an error that it cannot instantiate class [org.jboss.logging.util.OnlyOnceErrorHandler] ClassNotFoundException. … | |
I want to count the number of lines that are inputed in my program but I don't know how. Can someone please help me. Here's my code: [CODE]import java.util.*; import java.lang.*; import java.io.*; public class Exer6 { public static void main(String args[]) { String[] dummy1, dummy2, dummy3, dummy4, dummy5; String[] … | |
I want to compute md5 hash from a MimeMessage type.I use the following code to do this: [CODE] //MD5 private static String convertToHex(byte[] data) { StringBuilder buf = new StringBuilder(); for (int i = 0; i < data.length; i++) { int halfbyte = (data[i] >>> 4) & 0x0F; int two_halfs … | |
GOODAY experts, this code was to display an image from the database but when I runs it it displays an empty page, I tried to extend using Jframe but it still display an empty page. in my EXCEPTION I tried using PRINT STACK TRACE nowhere. please help me to fix … | |
Hello, I am making a program that tries to identify if an inputted word is a palindrome( word or number that reads backwards and forwards the same) but with the Pali() method of my program I have found out that when I compare the substring of letters it always ends … | |
Hi! I am working on scaling the image that is placed in JLabel. The scaling method itself works more or less fine, however a black border appears around the image after scaling. I tried to make the transparent/white JLabel background, but my attempts failed. Please explain me how could I … | |
Write a program that computes XN where X is a floating point number and N is a positive integer. The program informs the user that N must be positive if the user enters a negative value. Of course, XN = X * X * X * ... * X -------------------- … | |
I have a problem whit load of xml file into Oracle using StringBuffer. I get a java.sql.SQLException error “setString can only process strings of less than 32766 characters”. My problem a cure when I try to bind the CLOB with the prepared Statement in the StringBuffer. There are no problem … | |
Hi, In my application, I am creating a string array in a method. Each time I call that method this array will get created and also a null pointer exception is showing when I use the Arrays.sort() method. My method is like this... [code] int count = getTotalXMLCount(); envArray = … | |
Hello Everyone, I created a java code that runs batch files. Then, I deployed the java classes in apache-tomcat-5.5.26. The code worked when I ran the tomcat manually but when I ran the tomcat as a windows service, it did not work. I checked the tomcat log files but apparently … | |
Hello I am new to Java and I have no idea where to start with this program. Can somebody please start me off or display how you would execute the code. Thank you. This is what I have so far, but it is just the basics: [code] /* * For … | |
I wanted to make a program that deals with the editing of hex files, but I'm not sure how I would go about doing this. Normally I can just input a file into a Java program, read it into a String, then do what I please with it. If any … | |
hi, if i have this kind of string list: String num_list="1,2,5,3,4,6"; how can i make it in array? arraynum[100]=[1 , 2 , 5 , 3 , 4 , 6] | |
Hello, Could someone advice me for the best ide for GUI building in java? Thank you | |
Hello, i'm a new member here in this forum.. and i think lot of programmers may help me here.. i'm a newbie also in java programming.. my teacher wants us to make a program that accepts 5 integers and then arrange it from highest to lowest.. i have an idea … |
The End.