36,051 Topics

Member Avatar for
Member Avatar for wonder_laptop

i know that i should use this to compile all the java classes . i used these and its working great. but i dont understand all of this . i did some readings and i understand now that when i use "set" , it sets the varibale name to the …

Member Avatar for JamesCherrill
0
165
Member Avatar for newbieha

Hi,everyone Im new to JAVA and not sure how does recursion work in JAVA I have to use JAVA Turtle to draw snowflake here is the pseudocode. procedure snowflakePart( S, N ) : if N is greater than 0: move turtle forward S units if N is greater than 1: …

Member Avatar for newbieha
0
569
Member Avatar for HelloMe

How can i continue a very long sentence on the second line in a JLabel? /n does not work /t does not work as well I dont want the html thing cause i have a simple application. Thank you

Member Avatar for HelloMe
0
150
Member Avatar for MollyGirl

I have a program that randomly flips a quarter 100 times. The results gives me a list of heads and tails. I need the results to look like this: 100 Flips resulted in 49 heads and 51 tails. With varing numbers for heads and tails. Thank you for any help …

Member Avatar for peter_budo
0
92
Member Avatar for desert564

though the maortgagae cals works correctly the answers are not i columns [code] import java.io.*; import static java.lang.Math.*; import java.util.Scanner; import java.text.DecimalFormat; import java.text.NumberFormat; /** * @(#)AmortWeek3.java * * AmortWeek3 application * * @author * Week 3-Service Request SR-mf-003 * Change Request 1 * Display breakdown of monthly payments * …

Member Avatar for mKorbel
0
176
Member Avatar for HelloMe

Im planing to have several Methods that will display the question and the answer choices to their coresponding labels and cmdButtons. But somehow i get the error message "void is an invalid type for the variable" when i want to create my method below of my code (i commented the …

Member Avatar for HelloMe
0
4K
Member Avatar for code07

(1,1) (1,2) (1,3) (2,1) (2,2) (2,3) (3,1) (3,2) (3,3) (1) (2) (3) (4) (5) (6) (7) (8) (9)

Member Avatar for Taywin
0
94
Member Avatar for Xan

hi.. im an amateur in java and im having problems in switch statements.. i would appreciate if you would help me solve this problem.. [B]Problem:[COLOR="Red"] Write a java program that will let the user input 2 colors and display the result color..[/COLOR] [/B] [COLOR="Green"][B] This is what i come up …

Member Avatar for Taywin
0
916
Member Avatar for sanam_1
Member Avatar for jon.kiparsky
0
64
Member Avatar for vijiraghs

I am doing a servlet program that connects to a MSACCESS database,retrieves data and redirects the user to another page. I find the following error java.sql.SQLException: General error Login.java accesses esql.java which retrieves data from MSACCESS server. PLease help!!! My Servlet code: Login.java [CODE=java] import java.io.*; import java.sql.*; import java.io.*; …

Member Avatar for vijiraghs
0
722
Member Avatar for gingerfish

here is my code: [CODE]//if any of errprLists is not equal to 0, then initialWieght equals newWeight if(errorList[0]!=0 || errorList[1]!=0 || errorList[2]!=0 || errorList[3]!=0) { for(int i=0; i<row; i++) { initialWeight[i] = newWeight[i]; } } //break the loop if all errors equal 0 //--------------------------------------------------------------------------- else if(errorList[0]==0 && errorList[1]==0 && errorList[2]==0 …

Member Avatar for gingerfish
0
177
Member Avatar for Seshakumar

Hi guys! am new to this forum and this is my first thread :) am not sure if am posting at the correct forum, but its regarding servlets am doing a web application for 'online exam' using jsp, servlets and java bean. i've three serialized files holding my questions(questions.ser), options(options.ser) …

0
81
Member Avatar for rayden150

Hi can someone please indicate where is the error in the php code i wanted to sort of translate from java to php pleaase help: This is the Java Code: [CODE]public class Break{ public static void main(String[] args){ int i,j; System.out.println("Prime numbers between 1 to 50 : "); for (i …

Member Avatar for kekkaishi
0
109
Member Avatar for Dee1004

Hi everybody. I'm very new in programming languages and I have this project that from an input text file writes the frequency of the lemmas in the output file. I need to modify this and to make it work for an directory with text files as an input. I think …

Member Avatar for mKorbel
0
219
Member Avatar for desert564

any time a number is present in a word inflate its value by 1........ for eg, input anyone up four tennis output anytwo up five elevennis

Member Avatar for monarchmk
0
105
Member Avatar for desert564

i really need help with this program i am finding a saddle number of a 2-d array which is the min value in a particular column and maximum value in its row.......and my error with the code is arrayindexoutofboundexception eg input num=4 7 6 9 10 5 3 4 6 …

Member Avatar for desert564
0
95
Member Avatar for titan5

I have created to GUI interfaces using netbeans drag n drop. The first interface has a button upon clicking which opens the second interface. I want to close the 1st interface as soon as I click the button in it so that only the second interface is displayed. How can …

Member Avatar for titan5
-1
124
Member Avatar for burningflower

Hey peeps, I want to simply compile this program but i keep getting the error message: java.lang.ArrayIndexOutOfBoundsException Any help? :) [CODE] import java.util.ArrayList; import org.htmlparser.util.*; import org.htmlparser.*; import org.htmlparser.tags.*; import org.htmlparser.filters.*; public class you { static String s; static ArrayList <String> filter(String s,ArrayList <String> m) { ArrayList <String> m1= new …

Member Avatar for JamesCherrill
0
218
Member Avatar for smslive2

Hi Guys, Please i need someone who could hlp me write a simple ATM program for accepting PIN, Checking Balance and Withdrawing..

Member Avatar for Taywin
0
413
Member Avatar for demented_gurl

Hi, I have a web application using JBoss, Java and struts. I've managed to upload the file using struts, but is it possible to view the data from the uploaded file BEFORE inserting the data into database? or do I need to store them into a temp database first, then …

0
146
Member Avatar for rinizids
Member Avatar for sanam_1

I want to number the row and column . I get row number right around the left hand side ..I want the column number on the top..This is the code I have ..CAN PLLZZ HELP ME WID the column number plzz.. int[][] Board = new int[15][15]; for(int j=0;j<Board.length;j++) System.out.print(" "+j+" …

Member Avatar for sanam_1
0
513
Member Avatar for nramya82

Hello friends, I installed junit4.8.1 in my windows xp, while testing I see following errors.Below are my class path and the location of Junit where I installed. I would really appreciate if some one can help me on this CLASSPATH =.;C:\Program Files\Java\jre6\lib\ext\QTJava.zip;C:\junit4.8.1\junit4.8.1\junit4.8.1.jar JAVA_HOME = C:\Java\jdk1.5.0\bin Junit installation path C:\junit4.8.1\junit4.8.1\junit\tests when …

Member Avatar for HelloMe
0
1K
Member Avatar for HelloMe

My problem is that i have a main menu Class and i want that a MIDI song plays in the background. I research a bit in the internet but i only found to make a sound class... But i dont want to make a own class for it. Isn't there …

0
122
Member Avatar for kaneyip

Given array: int[] dimension = { 1, 2, 3 }; That produces the output: 1 2 3 12 13 23 123 I'm new to array...i can't figure out the way on even how to start... any idea?...really appreaciate if someone could help...thanks!

Member Avatar for JamesCherrill
0
112
Member Avatar for compass

Hi, I need a code for a virtual compass that I would like to include in an application that I manufactured for my task in school.Can anyone help me please?? Tnx

0
126
Member Avatar for JavaNewbieEK

I have an assignment in which I have to read in a series of words using the nextLine method from the Scanner class and then count the number of words using the StringTokenizer class. I know you all like for people to show some initiative by starting the program but …

Member Avatar for anumash
0
193
Member Avatar for sanam_1

how you number the 2d array??i created a 2d array now i want to number the rouws and colums...here is the code i have now [CODE]int[][] Board = new int[15][15]; for (int r = 0; r < Board.length; r++) { for (int c = 0; c < Board.length; c++) { …

Member Avatar for Taywin
0
112
Member Avatar for Buffalo101

Hello, I'm trying to write a simple Clicker program to automate room-joining on GArena: 2 clicks to attempt to join, 1 attempt per 5 seconds. That means I have to simulate 2 x mouseButton1 clicks every 5 seconds - easy. The problem with my clicker, as well as with other …

Member Avatar for Buffalo101
0
196
Member Avatar for Matulin

cacn you help me with this one import java.awt.Graphics; import java.awt.Color; import javax.swing.JApplet; public class Smiley extends JApplet { public void paint (Graphics g) { super.paint(g); g.setColor(new Color (60,10,0)); //outline pants g.drawRect(393,275,199,80); g.drawRect(394,276,199,80); g.setColor(new Color (145,90,0)); //brown (pants) g.drawRect(395,300,197,54); g.fillRect(395,300,197,54); g.setColor(new Color (255,255,255)); g.fillRect(395,275,197,50); //fill white (pants) g.setColor(new Color (32,5,0)); …

Member Avatar for jon.kiparsky
0
461
Member Avatar for HelloMe

Hello... Like the title already says, i have a Panel with a TextField and when a text is entered, i want it to appear on a JLabel that is located on another Panel. Can someone give me the Syntax? Or is it more complicated to do? I do not use …

Member Avatar for ndeniche
0
1K
Member Avatar for elite01

There is a card game I was trying to make for the past two weeks in java. Can be played here => [url]http://www.angelfire...ardtrick02.html[/url] Basically the player picks a card and the program will ask which column contains their card. It than shuffles the cards back together. After doing that three …

Member Avatar for jon.kiparsky
0
531
Member Avatar for mangopearapples

Hey guys, I was wondering how I could make games with Java3D. I've used Java3D but only in static programs. How could I 'repaint' with Java3D (Make games and such)? Also, where could I learn more of Java3D? I've only learn't what I know so far from a few tutorials …

Member Avatar for elite01
0
296
Member Avatar for tj0101

[CODE]/* Problem 3 Writing User-defined Methods Programmer: Date: March 10,2011 ProgramName:Tuition.java */ import java.io.*; import java.text.DecimalFormat; public class Tuition { public static void main(String[] arg) throws IOException { //declare and construct variable int hours; double fees, rate, tuition; //call methods displayWelcome(); hours = getHours(); rate = getRate(hours); tuition = calcTuition(hours, …

Member Avatar for jon.kiparsky
0
349
Member Avatar for mangopearapples

Hey people, How could I make it so when I right click and file and click 'Open With..' and choose my program so it loads the file? I already know how to load the file from when the program is already running and you click 'load' ect... [B]But,[/B] I tried …

Member Avatar for mangopearapples
0
178
Member Avatar for drogba123

Hi, Currently i have an array list listing some bigram. and i would like to have the array list to be formatted like this [am] - [amazing, amber] and so on [bi] - [big, bigas] and so on how should i go about it?thanks for the suggestions. Thanks much

Member Avatar for drogba123
0
121
Member Avatar for mani2
Member Avatar for mukorera

I have a session bean that I am using to persist data to the database and I need to use Junit testing on the ejb,can someone help me with information on how this can be done maybe with a sample code .I am working on Rational Web-sphere Developer version 7.5

-1
59
Member Avatar for carlitosway17

Hi guys am trying to create a calender that can output the date in three multiple formats In the first case the constructor should receive three integer values. In the second case it should receive a String and two integer values. In the third case it should receive two integer …

Member Avatar for carlitosway17
0
244
Member Avatar for churva_churva

[CODE] <html> <head> <title> User Registration</title> <body bgcolor="000000"text=ffffff> </head> <table width="20%"height="50%"border="2"> <div align="center"> <table> <h1>User Registration<h1> <form> Username: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <input type="text"style="color: #ffffff; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72a4d2;name="username"size="30" /><br><br> Password: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text"style="color: #ffffff; font-family: Verdana; font-weight: bold; font-size: …

Member Avatar for javaAddict
0
178
Member Avatar for JBeg

Hello, I am a complete beginner with writing java beans. I am supposed to be making a connect four java beans class.The game logic has already been implemented in the form of a Java class called connect4.GameBoard. My professor has provided me with the jar file and javadoc for this …

Member Avatar for end3r
0
202
Member Avatar for coervivekmca

[code=jsp] st.executeUpdate("update submittable set status='yes' WHERE compid='"+<%=request.getParameter("id")%>+"'"); [/code] can u rectify it ..i am having problem to solve it its urgent

Member Avatar for masijade
-1
64
Member Avatar for lorettah
Member Avatar for rohit2

Hi, Now I am trying to develop a tool using Java Swing. I have used JTextpane as editor of my tool. Now I want to add Content assist for this JTextpane ,so that I can easily type. My purpose is to provide listing of all objects and functions related to …

0
74
Member Avatar for jwenting

Validation whether a string can be parsed to a valid date according to a supplied formatting string (which should conform to the formatting rules as supplied in DateFormat). This version can also flag dates in the past as error (we need that because many of our applications should accept only …

Member Avatar for javaAddict
0
258
Member Avatar for caswimmer2011

Hello, I have this code that sorts strings but it does not sort them at all. I've been working on it for 2 hours already. Any help will be appreciated. Thanks in advance :)[code]public void SelectionSort() { for (int i = 0; i < myList.length - 1; i++) { int …

Member Avatar for mKorbel
0
183
Member Avatar for manish250

I have a jsp page which is showing data in that page from DB.there is also a facility to show data in excel file.So there is a link to import the data in excel file. I have noted down that url by pointing the cursor to that link that is …

Member Avatar for ~s.o.s~
0
229
Member Avatar for SolidSora

I want a loop that can count back and forth from 0 to 3. At first it counts up 1 each time and then when it reaches 3, it will count backwards to 0, then back up to 3 and so on. I already have a runnable that makes it …

Member Avatar for jon.kiparsky
0
3K
Member Avatar for dynaflex

My class recently switched from python to java. I feel like they just threw us in and said " oh they know python so they must know java" My first assignment is quite simple but having no prior knowledge of java i'm lost. basicly "PizzaRun is a simple program that …

Member Avatar for alexsmth114
0
213
Member Avatar for gunjannigam

I need yo draw a shape as attached in the image using Java graphics. I am struggling with the curve part. The curve part is a arc of an circle whose radius and center is known. But I have to paint the region out side of that arc. How will …

Member Avatar for gunjannigam
0
345

The End.