32,199 Topics

Member Avatar for
Member Avatar for MoooCow

Hello, I need help with the print function. Everything works fine, but when I run the that function it gives a stack over flow problem. I do not understand why when this print function works fine with the other binary search tree implementations. [CODE] public class SplayTree<AnyType extends Comparable<? super …

Member Avatar for obscured47
0
183
Member Avatar for osman_sonic

hi all, i am final year university student and i need some ideas for developing a distributed application to my final year project. any ideas ,example, that help me to finish my project in time because our last day of proposal is 05/04/2010 i do not need code just ideas …

Member Avatar for osman_sonic
0
257
Member Avatar for ceyesuma

I wrote a program in actionscript3 and it opens in any browser. Is it possible to run it to open in a window (container)?

Member Avatar for peter_budo
0
35
Member Avatar for stewie griffin

I trying to get text only from html code (no tags and exec) I used the next command (regular expression): htmlSurce = htmlSurce.replaceAll("\\<.*?*\\>", ""); it works fine but all the text between <!-- --> is not removed how can I remove it???

Member Avatar for stewie griffin
0
208
Member Avatar for the_fool

I'm writing a class program for a pre-wrote driver. I'm having issues accessing the array variables from the driver. I know my problem is that my setProject is trying to take my array as an argument, but the specification calls for two ints(array index, array index value). But I'm not …

Member Avatar for JamesCherrill
0
103
Member Avatar for xhollowpointx

Ok so first off hello all and thanks in advance for your help. Ok so I've done some research with regards to the error messages I'm getting and I've checked all my curl braces so i don't know what could be wrong with. Anyways I'm writing code to emulate the …

Member Avatar for stultuske
0
279
Member Avatar for help_please

hi im trying to put random letters into the array i created (only two letters 'x' and 'b' but they need to fill up the whole array) right now its just numbers between 0-9. does anyone know how to change them to letters, if so thanks! :) my output is …

Member Avatar for BestJewSinceJC
0
79
Member Avatar for darek9576

When i write in my program double pi = Math.PI; This will give me a value of PI accurate to many decimal places, but what if i want to limit this number lets say to 3 decimal places.. [b]Is there such a method in Java? [/b] (Im not talking here …

Member Avatar for BestJewSinceJC
0
85
Member Avatar for help_please

Hi im trying to make a 10X10 board using arrays and have to fill up 2/3 of the board with the letter b, and 1/3 with the letter x. Right now i have created the board and my output shows up as zeros for some reason. can somebody please help? …

Member Avatar for BestJewSinceJC
0
130
Member Avatar for BEBELINDO

I want an user to enter a word ...this program will tell the person if it is a palindrome...how do i insert joption pane code into this: public boolean isPalindrome(int start int end) { //separate case for substrings of length 0 or 1 if (start>=end) return true; //get first and …

Member Avatar for BestJewSinceJC
0
171
Member Avatar for darek9576

Can anyone outline the use of the keyword "instanceof". I mean, when do we use it etc.. Couple of examples would make it clearer i guess...

Member Avatar for BestJewSinceJC
0
96
Member Avatar for zheka

Hi all, I am very new to the Java and would like to get help with the Swing components in the thread: below is an ActionListener for the MOVE button which would simulate random movement of random circles on JPanel. I have created separate class RandomCircles which extends JPanel and …

0
53
Member Avatar for LReynolds

Ok, so I've been stuck for a little while now on this problem. I'm trying to pass an array of Tabs and I'm just not doing it correctly. I believe I'm missing something simple, because I need to learn more about what is happening with my code rather than just …

Member Avatar for LReynolds
0
110
Member Avatar for chern4ever

i m trying to write a gui java program. i have a main screen, i declared my object in the main screen class. in the main screen, i will call 2 jpanel. from different class how can i make the 2 jpanel use the same object i declared on my …

Member Avatar for chern4ever
0
158
Member Avatar for vAshunk

I created a program To return if a String entry is equal to "password". Sort of a password program. As you can see from the output the entry and expression are both equal. Why then does it print wrong?? [CODE]package Main; import java.io.*; class password { public void password() throws …

Member Avatar for ~s.o.s~
0
140
Member Avatar for Chaster

Maybe not the best forum to post this, but anyway; The problem is that I have a DB table that has a composite PK.This composite key is built up from an id, and a foreign key which is another id in another table. I have the mappings for these tables, …

0
47
Member Avatar for tlnarayana
Member Avatar for jwenting
0
33
Member Avatar for litchi

Hi :) I am Writing a program that takes text from a JTextArea and uses the string to do things upon clicking a button. I used an ActionListener for the button. My problem is that I recieve an empty string when I try to access the text from the JTextArea …

Member Avatar for litchi
0
126
Member Avatar for PhiberOptik

Hey guys I am calling two images using the code below, the first image called shows up when run, and when compiled into a executable jar. The other image shows up when run in eclipse but not when compiled into an executable jar: Here is the code: [CODE=java]image = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("myPicture.png"));[/CODE] …

Member Avatar for JamesCherrill
0
92
Member Avatar for twgood

Here is my assignment:Choose a product that lends itself to an inventory (for example, products at your workplace, office supplies, music CDs, DVD movies, or software). • Create a product class that holds the item number, the name of the product, the number of units in stock, and the price …

Member Avatar for Sister_loulou
0
136
Member Avatar for achiman

Hey I have just developed a client server chat system but I am having problem trying to save the conversation. Can anyone tell me how I can do this, I am not sure if I have to convert the inputstream to file or the datastream to file or neither. thanks

0
53
Member Avatar for monkey0525

I'm writing a program which prompts the user to enter a sentence and then prompt the user to enter a single letter of the alphabet (into a char value). It's also supposed to count and display the number of words containing the letter entered (not case sensitive) and the total …

Member Avatar for BestJewSinceJC
0
128
Member Avatar for Aisha25

Suppose you save $100 each month into a savings account with the annual interest rate 5%. So, the monthly interest rate is 0.05/12 = 0.00417. After the first month, the value in the account becomes 100 * (1 + 0.00417) = 100.417 After the second month, the value in the …

Member Avatar for kvass
-1
811
Member Avatar for David22

Hello DaniWeb community! I come to you in need of some guidance on a quite frustrating problem. In a nutshell, I am building a java system in which users can keep track of weather forecasts at a list of registered locations, which they can add or remove from their "watchlist". …

Member Avatar for BestJewSinceJC
0
134
Member Avatar for snprime

Hi all, I'm working on a program for my data handling class and I have a quick question. I'm trying to write a method that prints a range of elements in an array. I have written it in such a way that I create a new, smaller array with the …

Member Avatar for snprime
0
103
Member Avatar for idlackage

I'm supposed to allow the user to draw shapes based on their combobox choices (eg. line, rectangle, circle), colour, fill state, etc. However, nothing is showing up. Model class: [CODE]import java.awt.Color; import java.awt.Graphics; import javax.swing.JPanel; import javax.swing.JLabel; import javax.swing.JOptionPane; import java.awt.event.MouseAdapter; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.event.MouseEvent; public class DrawPanel …

Member Avatar for Ezzaral
0
189
Member Avatar for leliana

hi .. i wanna read text file in binary format ... 4 ex : lele and raz ..."in text file " l=10011001 e= 011110011 ..... "cmd (8 bit per letter)" and but them in an array ...i tried the type StringBuilder but it didnt work ... i need a method …

Member Avatar for leliana
0
1K
Member Avatar for ozidub

Hi, I'm new to Java and am having a problem getting my program to run, any help would be greatly appreciated. Here is the program: [CODE]//This program displays a message asking the user if they //want to know the Top Premiership Players. If they say Yes, //they will then be …

Member Avatar for masijade
0
102
Member Avatar for neovo-88

Hi, Im new to java and was wondering if someone could help me with my problem. Im writing a program which will calculate how long a journey will take, the user will need to enter a character to represent what type of road/speed they are doing and how long the …

Member Avatar for neovo-88
0
165
Member Avatar for Dark.Paladin

hy im having a little problem with a loop with jgrasp here is my basic program [code] import javax.swing.JOptionPane; public class loops1 { public static void main (String[]args) { String name do { String name = JOptionPane.showInputDialog ("who is the cleverest person in the room?"); } while (name != "erin"); …

Member Avatar for Dark.Paladin
0
155

The End.