32,199 Topics
| |
My teacher said that we needed to perform 3 mathematical actions on the chars so it works when I encrypt the textboxes but then it doesn't work when I decrypt them. I think it might be the order of my math operations in the decryption code? For example: I put … | |
need help with a homework problem and i've been starring at code all day and my brain is fried... any advice or pointers would be greatly appreciated Description of the Problem Write a method minimum3 that returns the smallest of three floating-point numbers. Use the Math.min method to implement minimum3. … | |
If I have an application written in Java, how can I make it available for purchase/download on my website? Namely, how do I obscure the source code so it can't be viewed, yet enable it to be executed by any machine (including ones that don't have the JVM installed)? | |
I have two graphics methods in my program. One for the menu and one for the game. I have previously written all of my code in one graphics with a bunch of nested ifs. Now I am trying to separate the two. Is there a way to call the gameGraphics … | |
Hi, This application does everything but show the circles and rectangles even though visible is set to true. [CODE]package Shapes; import java.awt.*; import javax.swing.*; public class ShapesTest { public static void main (String []args){ String input = JOptionPane.showInputDialog ("Enter 1 to draw rectangles\n" + "Enter 2 to draw ovals" ); … | |
I've run java programs in Command Prompt before and it worked, but today I tried and it's saying: 'javac' is not recognized as an internal or external command, operable program or batch file. I am running Windows Vista and have four (4) files under Java: jdk1.6.0_23 jdk1.6.0_24 jre1.6.0 jre6 Umm, … | |
I made the 4 buttons with top, move up, move down and bottom. But I took open the files for test.txt in LJist and it won't move it How do I add something. I will show you the code. And I saw Error for to press move down, it won't … | |
Hi, im trying to create a GUI which will house a BST. When the user enters a number and clicks add, it should display that number as a leaf in a BST. It then adds each consecutive leaf onto the last to create the BST. My problem is actually getting … | |
Hello, I have a program that has three text areas, and I'm going to add an image viewer. My question is how to save and load the text and images so that when the user clicks 'save' it will save a file with the text and images, and when the … | |
Hi, I am having trouble having the answer increment, I know it seems the increment value is lost in the method but I cannot find a way to make that work, can you please give some suggestions. Thanks. This program is supposed to ask the user to enter sales amount … | |
there is a problem with java code i need your help plz as soon as you can [CODE]import javax.swing.*; import java.io.*; /** *Homework #1 CaesarCipher.java *program to encrypt and decrypt stuff */ public static void main(String[] args) { ceasar1 cc = new ceasar1(); public class ceasar1 { public String dataencyptS, … | |
| Hi all, I'm writing a webcrawler as part of a search engine project at university, and have been using jsoup to my advantage. This connects to a page and neatly takes all the href's from anchor tags for me. However, when I add these to the arraylist of URLs waited … |
Hi, Can anybody tell me how can i set attributes of frame or components in a frame in ActionListener of a button. Regards. | |
I am trying to build a compiler using Java Code. I am stuck at the Lexical Analyzer Stage and am not getting the output I want. The Code: 1)Lexical Analyzer [CODE] public class LexicalAnalyzer { int lexemebegin; int state; Symbol tokenValue; TokenType currentTokenType; String Shura; int lineNumber; int position=-1; String … | |
Hi ,I am trying to catch exception if integer is out of certain interval ,how can I do that. Lets say that float variable has to be in the interval 2 to 5 in all other cases exception Thanks | |
Hi, I am rendering a bunch of cg images but now I need to make an applet that will view them. More specifically these images are very much like the first generation of google street view where you have a picture and you can get a camera to crop a … | |
hi i am trying to execute mysql stored procedure from java program but when i call that procedure CallableStatement stmt = con.prepareCall("call readFloor()"); it produce java.lang.NullPointerException at com.mysql.jdbc.StringUtils.indexOfIgnoreCaseRespectQuotes(StringUtils.java:948) so how can i remove this error readFloore() is sample stored procedure it return nothinh i tried this example whith another stored … | |
OK, so here's my assignment...ask the user for a sentence, then print each word along with its position in the sentence. Then ask for another sentence... if the sentence is empty, terminate. My code works... but I don't know how to get it to loop back to asking for another … | |
I have written my first class and I was given a driver program to test my class it might seem silly but how do I run the driver file to test my class Description: Java Class Die that will manage a roll of a six-sided die. The Class will include … | |
Greetings Everyone. :) My question is, is there any website which has intermediary java programs, i am concentrating on importing classes, Methodoverloading, Constructors and etc, i want some guidance with various examples, Do you have any suggestion? Adv Thanks, Susheel | |
Can anyone change this to polymorphism? it is a simple program. no calculation at all. but the problem is, everytime i'll try to use polymorphim or extanding the classes, error occurs. actually i wish this program is in polymorphism structure, but im not really good in it(polymorphism). [code] import java.io.*; … | |
hi, im trying to make a bike move by using the pedal() method, the method will move the bike forward a distance of half the circumference of a wheel. ive tried creating the pedal() method however when the method is invoke the position of the bike is still the same. … | |
[CODE]TreeSet goodWords = new TreeSet(); ... Iterator iterGoodWords = goodWords.iterator(); while (iterGoodWords.hasnext()) { String word = iterGoodWords.next(); System.out.println(word); }[/CODE] Tell me, why doesn’t that print anything even if there are some items in the goodWords collection? I know there are items in the set because when I check the size, … | |
hi, v converted a .mov video file to an .avi file using a online converter. When v try to play it by creating a Player object, it says the error: Unable to handle format mp42. We have typed the code in netbeans 6.9 and it works fine for other .avi … | |
This is my first time making a GUI and we're making a stopwatch...I figured everything out except for how to make the time elapsed have one decimal place ex: 1.1 seconds this is what I have so far [CODE]public void actionPerformed(ActionEvent ae){ stop.setEnabled(true); long endTime; if(ae.getActionCommand().equals("Start")){ display.setText("Start Button was Pressed"); … | |
I have a little problem with my if statement. I have a code where I am comparing if a sprite has moved far enough for another one to generate behind it. Here it is (the dots are choped out code): [CODE]if (unit > 0) { if (moved > speed + … | |
| [code=java]class Rectangle { int x, y; /* dalsi atributy */ public void moveLeft(int distance) { x -= distance; repaint(); } public void moveRight(int distance) { x += distance; repaint(); } public void moveUp(int distance) { y -= distance; repaint(); } public void moveDown(int distance) { y += distance; repaint(); } … |
I know to implement progress bars in Java, is it possible in JSP? | |
Hello everyone, I'm programming genetic processes in java for my project and I want simulate the mitosis of a human cell. A human cell contains 23 pairs of chromosome. Mitosis is basically a cell division, or reproduction, in which a cell gives rise to two genetically identical daughter cells. You … |
The End.