32,199 Topics

Member Avatar for
Member Avatar for sariberri

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 …

Member Avatar for alastair1008
0
858
Member Avatar for MisterSinyster

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. …

Member Avatar for jon.kiparsky
0
1K
Member Avatar for McCurry0x77

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)?

Member Avatar for sirlink99
0
191
Member Avatar for sirlink99

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 …

Member Avatar for sirlink99
0
455
Member Avatar for stavros141

Hello there, I am trying to make a sample website just to learn the basics, I already have a log in window and a home page but I want to add a featur in which users can sign up for it. My first option wuld be to use SQL but …

Member Avatar for stavros141
0
165
Member Avatar for lynnajoe

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" ); …

Member Avatar for lynnajoe
0
151
Member Avatar for WolfShield

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, …

Member Avatar for DelphiGuy
0
231
Member Avatar for Tazsweet19

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 …

Member Avatar for Tazsweet19
0
142
Member Avatar for Katana24

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 …

Member Avatar for Ezzaral
0
2K
Member Avatar for WolfShield

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 …

Member Avatar for sourabh17
0
146
Member Avatar for megsilm

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 …

Member Avatar for jon.kiparsky
0
281
Member Avatar for zainz

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, …

Member Avatar for zainz
0
254
Member Avatar for kris0r

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 …

Member Avatar for mKorbel
0
511
Member Avatar for anti_genius

Hi, Can anybody tell me how can i set attributes of frame or components in a frame in ActionListener of a button. Regards.

Member Avatar for alastair1008
0
154
Member Avatar for Ssnowlin

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 …

Member Avatar for Ssnowlin
0
388
Member Avatar for kukuruku

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

Member Avatar for mKorbel
0
103
Member Avatar for cwarn23

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 …

Member Avatar for mKorbel
0
173
Member Avatar for sj5536

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 …

Member Avatar for mKorbel
0
151
Member Avatar for CorruptionInc

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 …

Member Avatar for CorruptionInc
0
114
Member Avatar for Poopster01

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 …

Member Avatar for thekashyap
0
224
Member Avatar for susheelsundar

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

Member Avatar for jwenting
0
101
Member Avatar for aswad56

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.*; …

Member Avatar for thekashyap
0
91
Member Avatar for jinglylime

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. …

Member Avatar for thekashyap
0
128
Member Avatar for Skyelher

[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, …

Member Avatar for Skyelher
0
170
Member Avatar for SaranyaKrishnan

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 …

0
60
Member Avatar for sariberri

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"); …

Member Avatar for sariberri
0
213
Member Avatar for sirlink99

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 + …

0
81
Member Avatar for kubiak

[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(); } …

0
41
Member Avatar for lse123
Member Avatar for mkab

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 …

Member Avatar for mkab
0
230

The End.