36,051 Topics

Member Avatar for
Member Avatar for mahes_

I was reading through my text book on Java Programming...It showed two class methods compareTo() and equals()...It seems to be that there is no difference between this two...Can someone pls clear me on this..Thank You!

Member Avatar for rvntdhillon
0
223
Member Avatar for jenzelcarmel

will someone help me pls with my case study, i need it very urgent this is my code for shortest remaining time first or the preemptive sjf. i need to know how to make gantt chart. [CODE]import java.applet.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class SRTF extends Applet implements …

Member Avatar for javaAddict
0
2K
Member Avatar for Dean_Grobler

Hello! Attached is a file (GUI.png), I quickly did this in excel so.. It looks pretty crappy obviously. But when you take a look at the image and the layout of the components etc. What would you say is the best LayoutManager to use with this? GUI design is fun, …

Member Avatar for Adil Ahmed Zeb
0
136
Member Avatar for meghab

Hi All, I am creating an application in which I want to keep refreshing a jsp file and in that jsp file i need to keep calling another url of type [url]www.daniweb.com/receive.jsp?a=xxx&b=xxx[/url] and save this url in database. Here the url keeps changing in every second ie. values of a …

Member Avatar for meghab
0
113
Member Avatar for aravind rao

Hello Consider this scenario: [CODE]File file;[/CODE] and later [CODE]file = new File("Hello.txt");[/CODE] [CODE]file = new File("hi.txt");[/CODE] As you all know, this will create two text files in java. How do I delete one of these files, as in if I only wanted to delete hi.txt?

Member Avatar for javaAddict
0
93
Member Avatar for Jobie111

Hello, First off, thank you to anyone who helps me in advance. I am about as new as one can be to Java, and am having some troubles. In the below code, the goal is to create a fraction. The rules are the denominator has to remain positive and I …

Member Avatar for javaAddict
0
114
Member Avatar for bonafos
Member Avatar for javaAddict
0
322
Member Avatar for pankajagar2002

Hi, I am working with drools guvnor. Basically drools is a rule engine that helps to create rules. I want to calculate the nodes or find the flow of rule path that is taken by the guvnor to make any decision in rule. Please help if possible. Thanks in advance.

Member Avatar for masijade
0
76
Member Avatar for rob3097

Exception in thread "main" java.lang.IllegalArgumentException: Cannot format given Object as a Number at java.text.DecimalFormat.format(DecimalFormat.java:487) at java.text.Format.format(Format.java:140) at McVrideMortgageCalculator.Main.main(Main.java:69) The above statement is the error that occurs when running code. [CODE]package McVrideMortgageCalculator; import java.text.*; //Allows text formatting and used for formatting currency in this program public class Main { public static …

Member Avatar for hmho
0
141
Member Avatar for nikita.chandra

Hi all i am creating an application in which i m using jsp,servlet and javascript. on jsp page there are text boxes named ID and Passwprd and a submit button. When we submit jsp page first javascript will be executed if we left any of the text boxes blank, that …

Member Avatar for nikita.chandra
0
215
Member Avatar for Fourside

This has been going on for about a week now with a friend of mine who uses AIM. Since last Thursday, I've been having trouble communicating with her through AIM or any other client I've tried in which I've used AIM to contact her, be it AOL Instant Messenger itself, …

0
145
Member Avatar for Katana24

Hi guys - quick question I have created a class that creates an array of JButtons and places them onto the panel. That all works well but what I want is for the panel, placed on a frame container, to resize to fit the amount of buttons added. The total …

Member Avatar for masijade
0
66
Member Avatar for Guna16

Can anyone send me the code for downloading software using java in a search engine? Thank you in advance.

-1
59
Member Avatar for hazeeel

Hey guys How do I do a calculation of coordinates X,Y,Z between 2 files. Eg. File 1 has about 1000 lines and so does File 2 I have done the pre processing for the coordinates that are needed to be extracted out. They are kept in my 2D arrays. This …

0
55
Member Avatar for musikluver4

I would like to be able to divide this java code up into more than one file, so I can reuse the code for other programs, but I'm not sure what I can grab. Right now, I can't make another program using this code, as you see the WHOLE program …

Member Avatar for musikluver4
0
171
Member Avatar for notuserfriendly

I am reading from a file and while i know how to work with those i am trying to read the line. get all the fields. then store them in a class with those fields. then store that object in a vector. Heres how i deal with reading the stuff …

Member Avatar for notuserfriendly
0
149
Member Avatar for jems5

Why does parsing a float into array cause precision loss error. I am trying to sort data from a text file that contains text, integers and float numbers. Using the for statement causes loss of precision errors. How do I correct this please. [CODE] float y; for (float k = …

Member Avatar for BestJewSinceJC
0
123
Member Avatar for Fadam360

Hello all, i have a homework lab/assignment due by 12 tonight. It needs to print out a drawing panel and request 2 names from the user. It should then have a way to take the 2 names entered and create 2 new names in the drawing panel: e.i. "John" would …

Member Avatar for Fadam360
0
195
Member Avatar for bookworm619

I am having problem with calculating the angle using sin. So far, I got the literal of numbers, which is not making sense. I am supposed to match my answers with this: Set up new triangle with coordinates (0.0, 0.0), (3.0, 0.0), (3.0, 4.0) Area: 6.0 Parimeter: 12.0 Length side …

Member Avatar for tong1
0
158
Member Avatar for sciprog1

Hello Members, I have an Applet which calls a JFrame. Once the JFrame shows up, is there a way to make the Applet invisible? Thank you!! sciprog1

Member Avatar for sciprog1
0
35
Member Avatar for Yutxz

I received the error "possible loss of precision" on the last line of my code. Is it not possible to return a double? My instructions were to create a program, called power, that took a double (x) and raised it to an integer (n) power. [CODE] package power; /** * …

Member Avatar for Yutxz
0
197
Member Avatar for ncstplaya1234

[LIST=1] [CODE] System.out.print("Enter the letter(t or z): "); B]letter = keyboard.next();[/B] if (letter == 't'||letter == 'T') { System.out.println("True"); } else if (letter == 'z'|| letter == 'Z') { System.out.println("False"); } [/CODE] Im getting an error here in bold, what is the problem??

Member Avatar for Akill10
0
81
Member Avatar for nwalser

Ok so I have to write a reverse method of a stack and I am not quite sure how to do it. I understand that i need to pop the strings from one stack into another but whenever I try to do this errors arise. Specifically it says it cannot …

Member Avatar for cale.macdonald
0
835
Member Avatar for baldturtle

When i try to complile it says SlotMachineReel.java:175: missing return statement I think its because all my returns are in "if" statements and it needs a default return. line 128 & line 175 Thanks in advance for any help [CODE]/** * Constructs a new reel with its current face randomly …

Member Avatar for baldturtle
0
165
Member Avatar for jems5

I would like to sort a list (from a text file "sales.txt")that has text, int and float values. The problem I have is, my output only produces the last set of values. I would like to produce a table with as the final output. Please help me. [CODE]public class Sales …

Member Avatar for jems5
0
164
Member Avatar for kchadek

So I need to write test cases for a problem with multiplying, dividing, adding, & subtracting fractions but I just can't quite seem to get it correct that it works. Here is part of the test file [CODE]//Multiply if (f1.multiply(f2) == (-2/15)) { System.out.println("test multiply: passed"); } else { System.out.println("test …

Member Avatar for kchadek
0
109
Member Avatar for ramjeev

Hi everyone, I want to disable windows key in keyboard.Please let me know if u hav any idea.

Member Avatar for oknight
0
69
Member Avatar for sijothomas

Hi friends ...... I am doing a priject based on face recognation in java .... If anybody knows about it please help me....my doubts are:- 1-how can i read inage from a web cam ? 2-give a best and latest algorithm for comparingtwo images Anyway thanks in advance...May GOD bless …

Member Avatar for cale.macdonald
0
72
Member Avatar for gedas

hey guys, i am looking for source code as simple as possible that would be able to represent the shape of the human body in 3d (it could be almost stick man like or preferably something like this [url]http://www.3dlinks.com/oldsite/tutorials/GENERAL/chapter6_1.cfm[/url]) i would like to use for further development such as a …

Member Avatar for gedas
0
449
Member Avatar for Tiff22

Project 1 Project 1: Moving Objects Objectives Upon Completion of this project, students will be able to : Implement small classes that conform to a set specification. Use multiple classes together to solve a larger problem. Use logic to enforce a valid internal state and perform computations. Description The purpose …

Member Avatar for Katana24
-1
85
Member Avatar for wktsang1

I am using Apache Tomcat 5.5 + JSP in the web server, and MS SQL Server 2000 in another database server. There is no problem before I resinstall the web server due to hardware failure. I am not sure if I miss some configuration that all the Chinese character stored …

0
52
Member Avatar for cool girl

I have so much trouble with this questions not only questions I want to study big o and time complexity but until now I didn’t found any good sit that explained it so could anyone help me by proved some sits about big o and time complexity and I really …

Member Avatar for kramerd
-1
158
Member Avatar for doctorjo5

There are already 2 checkboxes to change to bold and italic. Now I want to make four radio buttons to change the font of the saying "say it with style!". Below is my code. [CODE]//******************************************************************** // StyleOptionsPanel.java Author: Lewis/Loftus // // Demonstrates the use of check boxes. //******************************************************************** import javax.swing.*; …

Member Avatar for kramerd
0
2K
Member Avatar for boiishuvo

When I tried to compile this code, it has one error says ThreadsDemo.java:37: 'else' without 'if' else { ^ I don't know what's wrong with that exactly? [CODE]import java.util.*; class A extends Thread { private static int counter=0; private final int id=++counter; A() { start(); } public void run() { …

Member Avatar for JamesCherrill
0
89
Member Avatar for Dean_Grobler

Hi there, In the code below my ImageIcon isn't showing when I run the program. I always struggle with adding Images in my GUIs and it's irritating. Is there some all important rule that I should know or something? [CODE] //Create window Components JLabel lblrequest = new JLabel("Enter amount of …

Member Avatar for JamesCherrill
0
4K
Member Avatar for Mega brains

I am developing a java application that should run entirely from a CD. I should not install anything on the machine but now I am in need of a database. Is there any DB that I could use to sort out my problem? Thank you.

Member Avatar for Ezzaral
0
77
Member Avatar for dalip_007

Hi Guys I require a Java applet (and web service on server) permitting upload of large files to the server. Client side: The applet UI should simply permit selection of a file for upload from the local directory structure. The server URL will be hard-coded in the applet. When the …

Member Avatar for dalip_007
0
155
Member Avatar for jemimaloh

Hi there. I am currently trying programme my code[COLOR="Red"](P)[/COLOR] to lookup a hashtable from another class[COLOR="Green"](F)[/COLOR]. IS that possible? Given that the hashtable is in the main method of [COLOR="Green"](F)[/COLOR]. Should I apply a toString() in [COLOR="Green"](F)[/COLOR] and make it a String variable before I call it into[COLOR="Red"](P)[/COLOR]? If I …

Member Avatar for jemimaloh
0
524
Member Avatar for bufospro

Hi, I am trying to learn about JQUERY. So , I found some examples and I am trying to apply to my pages. But something goes wrong. Could you help me please ? For example 1.html [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" …

Member Avatar for bufospro
0
124
Member Avatar for nidhiagrawal

How we change values of one combo box with respect to second combo box in same page using ajax in jsp?Plz help me its uergent.

0
36
Member Avatar for AirGear

I want to add sound in my Java program. I searched in Internet, and what I found was only how to add sound to java applet. Isn't there any way to insert sound into the desktop application java? Thanks in advance Regards, AG

Member Avatar for AirGear
0
141
Member Avatar for sivasuit
Member Avatar for MargaretAlbert

How do [B][URL="http://www.improsys.com/importer.htm"]IMPROSYS[/URL][/B] use Contact Importer JAVA in a JSP page? <%@ page language="java" contentType="text/html" %> <% String user = request.getParameter("user"); %> <% String password = request.getParameter("password"); %> <% String parser = request.getParameter("parser"); %> <% String userId = "";%> <% if(user == null) user = ""; if(password == null) password …

0
57
Member Avatar for nizam27391

hello.. i'm new and still learning netbeans.. i use netbeans as my mini project for my java course.. but here's what i dont understand.. i design using GUI.. i make black background... when i click on preview design.. everything seems ok and it look exactly like what i want.. but …

0
85
Member Avatar for python01

hi all, im fairly new to python and am struggling to find out how to read javascript values from a site. Help is much appreciated. thanks, Python01

Member Avatar for python01
0
276
Member Avatar for pentagenius

Hi all, I am having a problem with threads as demonstrated below: I have four very small and simple files. They are as follows: [CODE] 1) public class MainClass { private static SchedulerTest sch = null; public static void main(String[] args) { try{ sch = new SchedulerTest(); ThreadController tc = …

Member Avatar for ashams001
0
195
Member Avatar for kchadek

Ok so I'm brand new to programming and Java so go easy on me. The assignment is to take fractions and do all the operations to them, add, subtract, multiply, and divide. We are also required to do this with a test file and then the actual file. So far …

Member Avatar for kchadek
0
89
Member Avatar for Radio2006

I am trying to start this java program using the requirements below, but I have no idea where to start. Just so you guys know, I am just starting out in this language. i have experience in Javascript programming, but this is completely different. I am used to Java programs …

Member Avatar for Radio2006
0
247
Member Avatar for charat

So i am a college student and my assignment is to create a code that determines if an entered number is a palindrome or not. the assignment is as follows: "Write the following two methods: //Return the reversal of an integer, i.e. revers(456) returns 654 public static int reverse(int number) …

Member Avatar for weathernerd1990
0
3K
Member Avatar for rayden150

I created a little beginners program, and its about a Telephone network which has an operator and three clients: i made four classes, and it gives me error at planta and cliente In cliente it gives error on public class cliente private operadora Im Planta it gives me error in …

Member Avatar for kramerd
0
136

The End.