35,618 Topics

Member Avatar for
Member Avatar for kch1973

I have completed a program and it compiles fine. When I run it, it seems to run fine. The only thing is that I am missing element data for two of the objects I am printing out in the text area of this JFrame. I an array called printerProduct[5], that …

Member Avatar for kch1973
0
143
Member Avatar for Philip435

Hello Im going to make a program that is much like a calender. I havent started coding anything yet because I would like some advice on how to make the program "alive". - I wont it to be able to start up automatically when windows starts. - Run in the …

Member Avatar for mrnutty
0
93
Member Avatar for glenak

I know how to write messages and save it as a .txt file (using Input/Output streams). What I want to do now is to be able to click a button and have notepad open the .txt file. How can I do this?

Member Avatar for glenak
0
137
Member Avatar for TahoeSands

I have written some code that compares two "BufferedImage" rectangles by doing a pixel by pixel comparison. These BufferedImages are of "playing cards" with rounded corners so I would like to exclude those corner areas during the image comparison process since the varied background could cause the comparison to be …

Member Avatar for TahoeSands
0
89
Member Avatar for TahoeSands

I am writing a Java application that "passively" interacts with a Windows Desktop Application. What I mean when I say that it interacts "passively" is that I perform screen captures to determine the location of "buttons" displayed by this Desktop Application and I use "absolute" x and y coordinates to …

Member Avatar for TahoeSands
0
536
Member Avatar for sharma.raj411

hi every1 i m able to print the first record of the database on the page. but i m not able to go to next record which i want to show on click of a button. i dont want to use while(rs.next) as i dont want to show all the …

0
72
Member Avatar for titan5

I am given dates in string format- Eg. 11/09/2010. (11-09-2010 not allowed) How can I convert it into integer dates? I am given two such dates in string format only and I want to find the no of days between them.

Member Avatar for titan5
0
145
Member Avatar for extemer

class Stars { public static void main(String args[]) { int c=1; for(int i=1;i<=10;i++) { for(int k=1;k<=c;k++) { if(k%2==0) System.out.print("*"); // else // System.out.print("*"); } System.out.println(); c+=2; } output: * ** *** **** ***** ****** ******* ******** ********* i cannot understand that what the function of variable "c" and how it …

Member Avatar for NormR1
0
102
Member Avatar for nitin_gyan

Hi all, I saved my connector/j jar file into this location C:\ ... \Java\jre6\lib\ext as well as in $CATALINA_HOME/common/lib and i am using this code in the JSP : Class.forName("com.mysql.jdbc.Driver").newInstance(); I am getting below driver error message. Somebody please help me out. javax.servlet.ServletException: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver My jar file name is …

Member Avatar for peter_budo
0
143
Member Avatar for first7movie

HI ,how can i get the size of a JBUtton JLabel . I always get 0 when i use the getHeight or getWidth method .

Member Avatar for JamesCherrill
0
35
Member Avatar for whitewraith

public class DebugFour3 // This class uses a FixDebugBox class to instantiate two Box objects { public static void main(String[] args) { int width = 12; int length = 10; int height = 8; FixDebugBox box1 = new FixDebugBox FixDebugBox box2 = new FixDebugBox(width, length, height); System.out.println("The dimensions of the …

Member Avatar for coil
0
128
Member Avatar for Stein102

Okay, so i need help getting a value from a variable in one class's method. I want to use that data in another Class's method. Heres what i mean... [code=java] public class RoomType{ public String N(String[] args){ Scanner scan = new Scanner(System.in); String opt = ""; int x=1; do{ opt …

Member Avatar for coil
0
156
Member Avatar for ezkonekgal

Hello. Anyone familiar with the Halstead product metrics? we are going to implement it. and again i need some help. here is our algorithm: 1. The user runs the program. 2. The program will ask the user to browse the file he/she wants to be evaluated using the programer's own …

Member Avatar for jon.kiparsky
0
658
Member Avatar for TheWhite

so, lets say I have a thread that looks like this: [CODE=java] public run() { boolean active = true; while (active) { //do some action that takes a really long time } } [/CODE] Is there any way I can directly stop and destroy this thread in the middle of …

Member Avatar for ~s.o.s~
0
153
Member Avatar for tallygal

The question is: Write a code that will take and inches input and convert it to mm. Then display the same result using m, cm, and mm. Example would be: Input: 53 inches Output: 1346 mm OR 1 m 34 cm and 6 mm Something is happening with the remainder …

Member Avatar for coil
0
162
Member Avatar for TahoeSands

I found some code that does something that interests me, but I don't fully understand the implementation. The part I am struggling with is where the author "overrides" an "actionPerformed" method. I have a vague idea of why someone would want to override a method that is inherited from the …

Member Avatar for NormR1
0
417
Member Avatar for APatrizio

Just because security holes and vulnerabilities get reported to software vendors doesn't mean they are actually patched. A new report from IBM's X-Force security team found that of all the software holes reported in the first half of this year, more than half are still unpatched. IBM's X-Force report is …

Member Avatar for josephadeo
0
539
Member Avatar for arntb0rnprgrmr

Goodeve guys... please help me on how to start a java game.. we have a proposed game and mine is a song lyrics game.. this is our project for the finals and honestly, i'm not that good in java.. :C what should be the first step? what is the best …

Member Avatar for VernonDozier
0
198
Member Avatar for nitin_gyan

Hi all, I saved my connector/j rar file into this location C:\ ... \Java\jre6\lib\ext and i am using this code in the JSP : Class.forName("com.mysql.jdbc.Driver").newInstance(); I am getting below driver error message. Somebody please help me out. javax.servlet.ServletException: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

Member Avatar for nitin_gyan
0
187
Member Avatar for subrat_p

I tried a lot to open a JAR file but it is not opening.I typed in command prompt javaw -jar MyJar.jar but it is not open. It makes some error sound bt not open. Please help me regard this

Member Avatar for Ezzaral
0
174
Member Avatar for tactfulsaint

this error was displayed after i package and deployed my jsp file. i dont know any help? [CODE] HTTP Status 500 - -------------------------------------------------------------------------------- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP …

Member Avatar for ranu26
0
145
Member Avatar for Jiblix

Hey guys, I'm a newbie programmer and I'm trying to create a program which calculates BMI. Weight is in lbs and height is in inches. I've compiled this and its got quite a bit of errors, so I could really use some help. The final result that I'm trying to …

Member Avatar for Jiblix
0
936
Member Avatar for NewOrder

the class is the same. but there are two methods: first method: if simply returns a string. [CODE]public String FindPiece(String chessPiece) { return name; } [/CODE] name. is a constructor variable. it is a name of the chess piece [CODE]public Pawn(String name){ this.name=name; }[/CODE] second method public boolean isMoveValid(ChessPiece[][] pieces, …

Member Avatar for NewOrder
0
94
Member Avatar for hoppy9

Hello All, I am student just starting Java. I do need help with swing - GUI. I am creating 4 textfield that accepts input from 3 user and will display as a 2D Array in the text area. As well as calculate the average of one column from the input. …

Member Avatar for NormR1
0
496
Member Avatar for bino87

im tyinh to writ a program to calculate nd display the volum ,area as well as the area of 6 sides of the rectangular prism but im stuck lol im a beginners import java.util.Scanner; public class RectangularPrism { public static void main(String[] args) { int length; int width; int height; …

Member Avatar for robertmacedonia
0
373
Member Avatar for robertmacedonia

OK, so I want to thank all of you that helped me with my little problems within the past few days,I have almost come to the end of this project thanks to your suggestions. Now the thing is, I used ObjectInputStream & ObjectOutputStream to write down whole objects to a …

Member Avatar for robertmacedonia
0
2K
Member Avatar for abby2589

private static void randomNumber() { int rand; int min = -10; int max = 10; System.out.println(" "); for (int i = 0; i < 10; i++) { rand = (int) (Math.random() * (max - min + 1) ) + min; System.out.print(" " + rand); } System.out.println("\n"); } can anyone explain …

Member Avatar for extemer
0
203
Member Avatar for Dean_Grobler

Hi guys, I have this assignment to do: Synchronize access to the instance variable, accBalance. Because accBalance is a double and not an object, it cannot be used as the monitor. Use synchronized methods or synchronized blocks of code, as appropriate. Simultaniously test two threads. Because the threads can complete …

Member Avatar for Dean_Grobler
0
147
Member Avatar for seanooi

I have a problem outputting the contents of a text file. Whenever I try to display the contents of a file a "null" word is printed at the end of the output. Any help would be deeply appreciated. [code] import java.io.*; import java.lang.*; public class prog1 { public static void …

Member Avatar for javaAddict
0
222
Member Avatar for smoothe19

Here is what i currently have; the instructions are a bit vague so i am confused on what to do beyond this...any help will be tremendous! This is my 2nd week in java so please understand i am not an expert [CODE]public abstract class TestQuestion { protected String question; protected …

Member Avatar for javaAddict
-3
342

The End.