32,204 Topics

Member Avatar for
Member Avatar for MBPB

Hi all. I am learning Java, and having a problem with a sentinel loop to fill an array. I want the loop to terminate when -1 is added, OR when the array is filled. [CODE] int i = 0; int counter = 0; int[] array = new int[40]; System.out.print("Enter values …

Member Avatar for DavidKroukamp
0
3K
Member Avatar for scheppy

Ok, so I have my code for the timer [CODE] computer = new Timer (4000, this); computer.start (); [/CODE] The timer starts at the end of a method, and is supposed to start another method via actionlistener after 4 seconds, the problem is, after 4 seconds, the timer gives a …

Member Avatar for DavidKroukamp
0
186
Member Avatar for miss_lovely

Write a class that accepts a user's hourly rate of pay and number of hours worked. Display the user's gross pay, the withholding tax (15% of gross pay) and the net pay, (gross pay - withholding) I have my code below, but I'm lost. I dont know what I'm doing …

Member Avatar for DavidKroukamp
0
2K
Member Avatar for scheppy

ok so I have a JButton that has an image on it, and then after 4 seconds i want to put a differant image on it but the problem is the first image wont load I'm using [CODE] button1.setIcon (icon); try { Thread.sleep (4000); //sleeping for 4 seconds } catch …

Member Avatar for scheppy
0
172
Member Avatar for brandon66

This is what i am suppossed to do: Create an application that will ask the user for a number between 1 and 10 and then output the factorial of that number. Use a for loop to calculate the factorial. What is a factorial? A factorial is the product of all …

Member Avatar for brandon66
0
152
Member Avatar for Hypnos_16

Hello All, I'm trying to create three independent animations that all occur in one main frame. I have to use the following methods in my code [CODE]--- Animate --- public interface Animate { void move( double x, double y); void changeConfiguration(); } --- Drawable ----- import java.awt.Graphics2D; public interface Drawable …

Member Avatar for NormR1
0
2K
Member Avatar for Jashandeep

Hello all ! I have worked on PHP .There are many CMS available for PHP like Joomla,Wordpress,Magento,Cake,Druple etc.Is there any CMS which is available for java only?

Member Avatar for dmanw100
0
78
Member Avatar for behrad kiani

i am working in Dijkstra code.which i want to get the vertexes from user by using Array list.but there is a problem in computepath method i can't solve it. [CODE] public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("insert the number of Vertexes:"); int nv=input.nextInt();//nv = number …

Member Avatar for NormR1
0
245
Member Avatar for jkembo

I am stuck, I know how binary tree works, but I don't have any clue how to add data recursively in a binary tree. The user needs to enter a formula with logical operators. If the user presses to a button e.g NOT(unary operator), then it should display at follow …

Member Avatar for jkembo
0
284
Member Avatar for raj.mscking

Hi Gentles! My Self Raj, I am a new user of this site, i wants to create an application (with concept of Ecryption & Decryption) for transfer image with hiding (media file eg.mp3) Any one can help me how can do it, and how much possibilities combine hided media with …

Member Avatar for JamesCherrill
0
143
Member Avatar for gedas

hey guys, i am trying to create an app that would review text file that is on the server, how would i go around in doing that? i believe i need to login to the server for example root@123.123.123.123 and eneter the password, later i need to navigate the file …

Member Avatar for DavidKroukamp
0
138
Member Avatar for abhishekwaichal

Hi guys, I am looking out for a way to compress binary data. Please suggest me some java api for the same. Also is good to compress data using runlength encoding or deflate? THANKS Abhishek Waichal

Member Avatar for JamesCherrill
0
35
Member Avatar for jackbauer24

I've got to explain this to my ten year old son, so please explain this in an easy way. (If you can, each and every thing about [ICODE]this()[/ICODE].) Thanks in advance.

Member Avatar for jackbauer24
0
171
Member Avatar for mehnihma

Can you help me with this problem I have a class and I need to create separate class justo fro reste button, but I am not sure how to do this? Here is what I have done [CODE] import javax.swing.*; import java.awt.*; import java.awt.event.*; public class MyEventC extends JFrame implements …

Member Avatar for peter_budo
0
1K
Member Avatar for harinath_2007

Hi , I developed an application which checks mail(gmail) all the time and alerts me whenever new mail has come. In short its a email notifier or email alerter. The application uses IMAP protocol .The application opens the connection once and it continously checks whether a new mail has come. …

Member Avatar for harinath_2007
0
126
Member Avatar for furqanishaq

hiya i stuck on this can anyone help please Result1 = (Val1*Val2)/Val3; Result2 = (Val1+Val2)-Val3; write a sperate method to print the result of the above calculation and then write a main app class to create an operator object set it up with some test data to calculate the values …

Member Avatar for DavidKroukamp
0
115
Member Avatar for macdunk11

I REALLY need help. ThIs program works - except I have one fatal error that I can't seem to figure out how to fix. The players can play where other players have already played. I tried to use the switch statement at the bottom in method checkMove where if result …

Member Avatar for hiddepolen
0
588
Member Avatar for jackbauer24

Please explain all these four pages- Open the images in paint. Only then will you be able to view it. Thanks in advance.

Member Avatar for JamesCherrill
0
168
Member Avatar for R_K

I display the progress bar for downloading attachments and it works fine … but when I am downloading some attachments I get the exception message: [QUOTE] Exception in thread "main" com.sun.mail.util.DecodingException: BASE64Decoder: Error in encoded stream: needed 4 valid base64 characters but only got 1 before EOF, the 10 most …

0
173
Member Avatar for 47pirates

How can i update my Jpanel with the labels from another class in certain intervals?

Member Avatar for 47pirates
0
272
Member Avatar for arathy nair

I want to delete the strings file1 and file2 after its merged to a single pdf merge12. Please suggest your valuable ideas.. Thanks in advance package com; import java.io.FileOutputStream; import java.util.ArrayList; import com.itextpdf.text.Document; import com.itextpdf.text.pdf.PdfCopy; import com.itextpdf.text.pdf.PdfImportedPage; import com.itextpdf.text.pdf.PdfReader; /* * author * @282532 */ public class PdfMerger { public …

Member Avatar for arathy nair
0
417
Member Avatar for araib

I want to ask a question When i say i am deploying application on the cloud its means that my application is basically on the my computer and API's provide basiclly provide server requests to my computer? Is application uploaded to the server? or still on my computer? Can anyone …

Member Avatar for JamesCherrill
0
105
Member Avatar for araib

I am preparing to make a project "Accessing SANS through application on the cloud" the objective of the project is deploy a SAN in our company and allow users to upload and use data through application stored at Google App Engine. Is this achieveable? if yes then how could application …

0
90
Member Avatar for techgeek420

Hey everyone! I am trying to writing a program that will play hangman. I have an understanding, on paper, of how to write the program... but I just cant fully convert it into java. I have started the program but I've gotten to a point where I'm stumped. Any help …

Member Avatar for NormR1
0
196
Member Avatar for letters1417

Okay so this is another question printing patterns but this time using input! I have to prompt the user and read an odd number from the input. I can only use System.out.print('*'); System.out.print(' '); and System.out.println(); I need to maximize my use of repetition and minimize the number of output …

Member Avatar for DavidKroukamp
0
514
Member Avatar for bsabowala

When I export the program to a executive Jar, file.txt does not import. The file.txt is in my src folder. Everything works file when i run the program in eclipse but when i export it, it does not import. HELP, I am new to Java and everything.

Member Avatar for DavidKroukamp
0
391
Member Avatar for FALL3N

ok, I'm pretty embarrassed to be posting such a simple question, I feel like I've done this in much harder applications like a million times... [CODE]String[] wordVar = text.split("$");[/CODE] Why does the above code not split the String 'text' at each occurrence of a "$"? Is the "$" a special …

Member Avatar for FALL3N
0
167
Member Avatar for ThaiAmL

I'm writing an assignment for my introduction to programming class and we're supposed to implement the following interface: [CODE] public Interface Account{ //Calculates interest (1%) and adds to the account balance public void interest(); //Calculates the balance after a deposit public void payIn(double money); //Calculates the balance after a charge …

Member Avatar for ThaiAmL
0
201
Member Avatar for Thermalnuke

Hey guys been working on a java Program. I am having a problem with my percent rounding up to 7% instead displaying 6.5% any ideas here is my Program. [CODE]import javax.swing.JOptionPane; import java.math.*; import java.text.NumberFormat; public class Week_three_number_eleven { public static void main(String[] args) { String Investment = JOptionPane.showInputDialog(null,"Please enter …

Member Avatar for stultuske
0
127
Member Avatar for deathmagnetix

Write an application that computes the cost of a telephone call. The inputs are the time the call was placed (this should be written as a 24-hour time, e.g., 2149 for a call placed a 9:49p.m.), the duration of the call in minutes, and the distance in miles of the …

Member Avatar for deathmagnetix
0
956

The End.