32,199 Topics
| |
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 … | |
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 … | |
I wrote a program in actionscript3 and it opens in any browser. Is it possible to run it to open in a window (container)? | |
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??? | |
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 … | |
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 … | |
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 … | |
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 … | |
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? … | |
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 … | |
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... | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
i am also have same problem that what is j2me path plz send | |
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 … | |
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] … | |
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 … | |
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 | |
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 … | |
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 … | |
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". … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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"); … |
The End.