32,199 Topics

Member Avatar for
Member Avatar for hao90

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 …

Member Avatar for JKP()
0
93
Member Avatar for bangor_boy

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 …

Member Avatar for bangor_boy
0
124
Member Avatar for montalbano80

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 …

Member Avatar for Akill10
0
629
Member Avatar for purijatin

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 …

Member Avatar for purijatin
0
186
Member Avatar for newbie14

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 …

Member Avatar for newbie14
0
114
Member Avatar for javanoob101

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 …

Member Avatar for javanoob101
0
227
Member Avatar for sirlink99

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. …

Member Avatar for sirlink99
0
162
Member Avatar for sirlink99

I imported a picture onto another picture and I am wondering how to get rid of the white around the smaller picture.

Member Avatar for sirlink99
0
270
Member Avatar for sirlink99

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 { …

Member Avatar for sirlink99
0
365
Member Avatar for methmignonne

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 …

0
198
Member Avatar for NasserSJH

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(); …

Member Avatar for NasserSJH
0
202
Member Avatar for riahc3

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 …

Member Avatar for riahc3
0
893
Member Avatar for Java-Newbie

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 …

Member Avatar for javaAddict
0
6K
Member Avatar for Amuthaalbe

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 …

Member Avatar for Amuthaalbe
0
542
Member Avatar for yukikazemedia

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 …

Member Avatar for Eric Cute
0
323
Member Avatar for Eric Cute

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. …

0
93
Member Avatar for pmark019

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[] …

Member Avatar for pmark019
0
177
Member Avatar for Argyrisv

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 …

Member Avatar for Argyrisv
0
189
Member Avatar for mutago

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 …

0
90
Member Avatar for emcyroyale

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 …

Member Avatar for JDCyrus
0
191
Member Avatar for LianaN

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 …

Member Avatar for LianaN
0
447
Member Avatar for rusl07cl08

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 -------------------- …

Member Avatar for Akill10
0
661
Member Avatar for DragonL

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 …

Member Avatar for masijade
0
418
Member Avatar for Janu Sam

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 = …

Member Avatar for Janu Sam
0
362
Member Avatar for jamojo

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 …

Member Avatar for ~s.o.s~
0
146
Member Avatar for coco24

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 …

Member Avatar for JKP()
0
121
Member Avatar for ChiboSempai

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 …

Member Avatar for JamesCherrill
0
228
Member Avatar for ubi_ct83

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]

Member Avatar for masijade
0
72
Member Avatar for Neversleepin

Hello, Could someone advice me for the best ide for GUI building in java? Thank you

Member Avatar for peter_budo
0
464
Member Avatar for o0sample0o

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 …

Member Avatar for Eric Cute
0
1K

The End.